diff --git a/internal/api/third/minio_storage_credential.go b/internal/api/third/minio_storage_credential.go index 40ae13c4a..7a6926360 100644 --- a/internal/api/third/minio_storage_credential.go +++ b/internal/api/third/minio_storage_credential.go @@ -83,7 +83,7 @@ func MinioUploadFile(c *gin.Context) { return } newName, newType := utils.GetNewFileNameAndContentType(file.Filename, req.FileType) - log.Debug(req.OperationID, utils.GetSelfFuncName(), config.Config.Credential.Minio.Bucket, newName, fileObj, file.Size, newType) + 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") diff --git a/internal/cms_api/admin/admin.go b/internal/cms_api/admin/admin.go index f079194f1..4fadfb180 100644 --- a/internal/cms_api/admin/admin.go +++ b/internal/cms_api/admin/admin.go @@ -112,7 +112,7 @@ func UploadUpdateApp(c *gin.Context) { Creds: credentials.NewStaticV4(config.Config.Credential.Minio.AccessKeyID, config.Config.Credential.Minio.SecretAccessKey, ""), Secure: false, }) - fmt.Println(apiThird.MinioClient.EndpointURL()) + fmt.Println(minioClient.EndpointURL()) _, err = minioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newFileName, fileObj, file.Size, minio.PutObjectOptions{ContentType: path.Ext(newFileName)}) if err != nil {