Feat: file upload handler

This commit is contained in:
HFO4
2019-11-17 13:50:14 +08:00
parent 841832bb65
commit 99e7eecab7
12 changed files with 242 additions and 25 deletions

View File

@@ -17,11 +17,8 @@ func FileUpload(c *gin.Context) {
return
}
var (
ctx context.Context
cancel context.CancelFunc
)
ctx, cancel = context.WithCancel(context.Background())
// 建立上下文
ctx, cancel := context.WithCancel(context.Background())
var service file.UploadService
defer cancel()