opt: Only create actived upload service

This commit is contained in:
RockYang
2023-09-08 06:46:24 +08:00
parent af9e6f2c46
commit 0a9b325360
3 changed files with 23 additions and 22 deletions

View File

@@ -21,11 +21,11 @@ func NewUploadHandler(app *core.AppServer, db *gorm.DB, manager *oss.UploaderMan
}
func (h *UploadHandler) Upload(c *gin.Context) {
fileURL, err := h.uploaderManager.GetActiveService().PutFile(c, "file")
fileURL, err := h.uploaderManager.GetUploadHandler().PutFile(c, "file")
if err != nil {
resp.ERROR(c, err.Error())
return
}
resp.SUCCESS(c, fileURL)
}