Feat: after uploading hooks and checks

This commit is contained in:
HFO4
2019-11-18 19:09:56 +08:00
parent 0dddc12609
commit aa17aa8e6a
10 changed files with 105 additions and 16 deletions

View File

@@ -73,7 +73,7 @@ func FileUploadStream(c *gin.Context) {
fs.AfterUploadCanceled = filesystem.GenericAfterUploadCanceled
// 执行上传
uploadCtx := context.WithValue(ctx, "ginCtx", c)
uploadCtx := context.WithValue(ctx, filesystem.GinCtx, c)
err = fs.Upload(uploadCtx, fileData)
if err != nil {
c.JSON(200, serializer.Err(serializer.CodeUploadFailed, err.Error(), err))