From dcf119ae59ce3e73f31f8c54c318f1117c271aa2 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 10 May 2022 14:38:43 +0800 Subject: [PATCH] update app --- internal/cms_api/admin/admin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()})