mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2026-11-05 16:38:06 +00:00
Feat: use goroutine to detect upload-canceling action / Object name validate
This commit is contained in:
1 parent
331931e539
commit
160f964564
6 files changed
+54
-1
No files matched your search
@@ -24,12 +24,14 @@ func (handler Handler) Put(ctx context.Context, file io.ReadCloser, dst string)
|
||||
}
|
||||
}
|
||||
|
||||
// 创建目标文件
|
||||
out, err := os.Create(dst)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer out.Close()
|
||||
|
||||
// 写入文件内容
|
||||
_, err = io.Copy(out, file)
|
||||
return err
|
||||
}
|
||||
Reference in new issue
Block a user