This commit is contained in:
wangchuxiao 2022-05-10 11:17:54 +08:00
parent 74b582369a
commit 30fc4c28b7
3 changed files with 4 additions and 3 deletions

View File

@ -75,6 +75,7 @@ func MinioInit() {
} }
// 自动化桶public的代码 // 自动化桶public的代码
err = MinioClient.SetBucketPolicy(context.Background(), config.Config.Credential.Minio.Bucket, policy.BucketPolicyReadWrite) err = MinioClient.SetBucketPolicy(context.Background(), config.Config.Credential.Minio.Bucket, policy.BucketPolicyReadWrite)
err = MinioClient.SetBucketPolicy(context.Background(), config.Config.Credential.Minio.AppBucket, policy.BucketPolicyReadWrite)
if err != nil { if err != nil {
log.NewDebug("", utils.GetSelfFuncName(), "SetBucketPolicy failed please set in web", err.Error()) log.NewDebug("", utils.GetSelfFuncName(), "SetBucketPolicy failed please set in web", err.Error())
return return

View File

@ -69,7 +69,7 @@ func UploadUpdateApp(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "invalid file path" + err.Error()}) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "invalid file path" + err.Error()})
return return
} }
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "name: ", newFileName, newYamlName) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "name: ", newFileName, newYamlName, fileObj, yamlObj, req.File.Size, req.Yaml.Size)
// v2.0.9_app_linux v2.0.9_yaml_linux // v2.0.9_app_linux v2.0.9_yaml_linux
_, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newFileName, fileObj, req.File.Size, minio.PutObjectOptions{}) _, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newFileName, fileObj, req.File.Size, minio.PutObjectOptions{})
_, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newYamlName, yamlObj, req.Yaml.Size, minio.PutObjectOptions{}) _, err = apiThird.MinioClient.PutObject(context.Background(), config.Config.Credential.Minio.AppBucket, newYamlName, yamlObj, req.Yaml.Size, minio.PutObjectOptions{})

View File

@ -274,8 +274,8 @@ func (DepartmentMember) TableName() string {
} }
type AppVersion struct { type AppVersion struct {
Version string `gorm:"column:user_id;size:64"` Version string `gorm:"column:version;size:64"`
Type int `gorm:"column:user_id;primary_key"` Type int `gorm:"column:type;primary_key"`
UpdateTime int `gorm:"column:update_time"` UpdateTime int `gorm:"column:update_time"`
ForceUpdate bool `gorm:"column:force_update"` ForceUpdate bool `gorm:"column:force_update"`
} }