Fix: capacity should be returned back when put failed

This commit is contained in:
HFO4
2020-01-25 10:40:53 +08:00
parent 8d437a451c
commit dc32e85492
8 changed files with 47 additions and 16 deletions

View File

@@ -346,6 +346,7 @@ func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request, fs *filesyst
fs.Use("AfterUpload", filesystem.GenericAfterUpload)
fs.Use("AfterValidateFailed", filesystem.HookDeleteTempFile)
fs.Use("AfterValidateFailed", filesystem.HookGiveBackCapacity)
fs.Use("AfterUploadFailed", filesystem.HookGiveBackCapacity)
}
// 执行上传