pull/236/head
wangchuxiao 2 years ago
parent 4e11c7a9e2
commit 5ea620a4cd

@ -87,7 +87,7 @@ func MinioUploadFile(c *gin.Context) {
log.Debug(req.OperationID, utils.GetSelfFuncName(), config.Config.Credential.Minio.Bucket, newName, fileObj, file.Size, newType, MinioClient.EndpointURL())
_, err = MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.Bucket, newName, fileObj, file.Size, minio.PutObjectOptions{ContentType: newType})
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "upload file error")
log.NewError(req.OperationID, utils.GetSelfFuncName(), "upload file error", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "upload file error" + err.Error()})
return
}

Loading…
Cancel
Save