Feat: recycling file storage and user capacity when uploading canceled

This commit is contained in:
HFO4
2019-11-18 14:06:15 +08:00
parent 160f964564
commit 631c23f065
9 changed files with 93 additions and 14 deletions

View File

@@ -70,6 +70,7 @@ func FileUploadStream(c *gin.Context) {
// 给文件系统分配钩子
fs.BeforeUpload = filesystem.GenericBeforeUpload
fs.AfterUploadCanceled = filesystem.GenericAfterUploadCanceled
// 执行上传
uploadCtx := context.WithValue(ctx, "ginCtx", c)