Feat: after uploading finished hook

This commit is contained in:
HFO4
2019-11-18 19:32:06 +08:00
parent aa17aa8e6a
commit 2e9f256462
7 changed files with 39 additions and 15 deletions

View File

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