From ed3e299e0b353be72b7fde4390904c2bde7168aa Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 10 May 2022 14:18:36 +0800 Subject: [PATCH] update app --- internal/cms_api/admin/admin.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/cms_api/admin/admin.go b/internal/cms_api/admin/admin.go index 244f8a377..7cf205ae9 100644 --- a/internal/cms_api/admin/admin.go +++ b/internal/cms_api/admin/admin.go @@ -104,16 +104,16 @@ func UploadUpdateApp(c *gin.Context) { return } - fmt.Println(req.OperationID, utils.GetSelfFuncName(), "name: ", config.Config.Credential.Minio.AppBucket, newFileName, fileObj, req.File.Size) - fmt.Println(req.OperationID, utils.GetSelfFuncName(), "name: ", config.Config.Credential.Minio.AppBucket, newYamlName, yamlObj, req.Yaml.Size) + fmt.Println(req.OperationID, utils.GetSelfFuncName(), "name: ", config.Config.Credential.Minio.AppBucket, newFileName, fileObj, file.Size) + fmt.Println(req.OperationID, utils.GetSelfFuncName(), "name: ", config.Config.Credential.Minio.AppBucket, newYamlName, yamlObj, yaml.Size) - _, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newFileName, fileObj, req.File.Size, minio.PutObjectOptions{ContentType: path.Ext(newFileName)}) + _, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newFileName, fileObj, file.Size, minio.PutObjectOptions{ContentType: path.Ext(newFileName)}) if err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), "PutObject file error") 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, req.Yaml.Size, minio.PutObjectOptions{ContentType: path.Ext(newYamlName)}) + _, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newYamlName, yamlObj, file.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()})