mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
Fix: capacity should be returned back when put failed
This commit is contained in:
@@ -43,6 +43,7 @@ func (fs *FileSystem) Upload(ctx context.Context, file FileHeader) (err error) {
|
||||
// 保存文件
|
||||
err = fs.Handler.Put(ctx, file, savePath, file.GetSize())
|
||||
if err != nil {
|
||||
fs.Trigger(ctx, "AfterUploadFailed")
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user