diff --git a/internal/cms_api/admin/admin.go b/internal/cms_api/admin/admin.go index b88680abe..b407a0b39 100644 --- a/internal/cms_api/admin/admin.go +++ b/internal/cms_api/admin/admin.go @@ -114,7 +114,7 @@ func UploadUpdateApp(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "PutObject file error" + err.Error()}) return } - _, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newYamlName, yamlObj, file.Size, minio.PutObjectOptions{ContentType: path.Ext(newYamlName)}) + _, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newYamlName, yamlObj, yaml.Size, minio.PutObjectOptions{ContentType: path.Ext(newYamlName)}) if err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), "PutObject yaml error") c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "PutObject yaml error" + err.Error()})