From 457768bb1066d195f400e3e3f9d099fbde283adf Mon Sep 17 00:00:00 2001 From: piexlmax <303176530@qq.com> Date: Sat, 26 Feb 2022 20:22:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=91=E5=B8=832.5.0=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/server.go | 2 +- web/src/core/config.js | 2 +- web/src/core/gin-vue-admin.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/core/server.go b/server/core/server.go index 8ddcd90bb..885321cba 100644 --- a/server/core/server.go +++ b/server/core/server.go @@ -37,7 +37,7 @@ func RunWindowsServer() { fmt.Printf(` 欢迎使用 github.com/flipped-aurora/gin-vue-admin/server - 当前版本:V2.5.0 beta.2 + 当前版本:V2.5.0 加群方式:微信号:shouzi_1994 QQ群:622360840 GVA讨论社区:https://support.qq.com/products/371961 默认自动化文档地址:http://127.0.0.1%s/swagger/index.html diff --git a/web/src/core/config.js b/web/src/core/config.js index d1d3a1bdb..9efd6a2a1 100644 --- a/web/src/core/config.js +++ b/web/src/core/config.js @@ -18,7 +18,7 @@ export const viteLogo = (env) => { ) console.log( chalk.green( - `> 当前版本:V2.5.0 beta.2` + `> 当前版本:V2.5.0` ) ) console.log( diff --git a/web/src/core/gin-vue-admin.js b/web/src/core/gin-vue-admin.js index 19cddacda..fbd2affb2 100644 --- a/web/src/core/gin-vue-admin.js +++ b/web/src/core/gin-vue-admin.js @@ -10,7 +10,7 @@ export default { register(app) console.log(` 欢迎使用 Gin-Vue-Admin - 当前版本:V2.5.0 beta.2 + 当前版本:V2.5.0 加群方式:微信:shouzi_1994 QQ群:622360840 GVA讨论社区:https://support.qq.com/products/371961 默认自动化文档地址:http://127.0.0.1:${import.meta.env.VITE_SERVER_PORT}/swagger/index.html From cc409fbab6e019116444b2636b63d07f20f55cf3 Mon Sep 17 00:00:00 2001 From: Rebellioncry <31620265+Rebellioncry@users.noreply.github.com> Date: Sat, 26 Feb 2022 20:28:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?AwsS3=E6=96=B0=E5=A2=9E=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=B1=9E=E6=80=A7,=E5=8F=AF=E4=BB=A5=E5=85=BC=E5=AE=B9minio=20?= =?UTF-8?q?(#932)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rebellioncry <23714@aomai.com> --- server/config.yaml | 5 ++++- server/config/oss_aws.go | 15 +++++++++------ server/utils/upload/aws_s3.go | 5 ++++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/server/config.yaml b/server/config.yaml index 70bc5af53..e188fd62c 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -150,10 +150,13 @@ tencent-cos: base-url: 'https://gin.vue.admin' path-prefix: 'github.com/flipped-aurora/gin-vue-admin/server' -# aws s3 configuration +# aws s3 configuration (minio compatible) aws-s3: bucket: xxxxx-10005608 region: ap-shanghai + endpoint: '' + s3-force-path-style: false + disable-ssl: false secret-id: xxxxxxxx secret-key: xxxxxxxx base-url: https://gin.vue.admin diff --git a/server/config/oss_aws.go b/server/config/oss_aws.go index 545c7defa..c66b49c0a 100644 --- a/server/config/oss_aws.go +++ b/server/config/oss_aws.go @@ -1,10 +1,13 @@ package config type AwsS3 struct { - Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"` - Region string `mapstructure:"region" json:"region" yaml:"region"` - SecretID string `mapstructure:"secret-id" json:"secretID" yaml:"secret-id"` - SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"` - BaseURL string `mapstructure:"base-url" json:"baseURL" yaml:"base-url"` - PathPrefix string `mapstructure:"path-prefix" json:"pathPrefix" yaml:"path-prefix"` + Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"` + Region string `mapstructure:"region" json:"region" yaml:"region"` + Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"` + S3ForcePathStyle bool `mapstructure:"s3-force-path-style" json:"s3ForcePathStyle" yaml:"s3-force-path-style"` + DisableSSL bool `mapstructure:"disable-ssl" json:"disableSSL" yaml:"disable-ssl"` + SecretID string `mapstructure:"secret-id" json:"secretID" yaml:"secret-id"` + SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"` + BaseURL string `mapstructure:"base-url" json:"baseURL" yaml:"base-url"` + PathPrefix string `mapstructure:"path-prefix" json:"pathPrefix" yaml:"path-prefix"` } diff --git a/server/utils/upload/aws_s3.go b/server/utils/upload/aws_s3.go index 00619a299..e738b1b67 100644 --- a/server/utils/upload/aws_s3.go +++ b/server/utils/upload/aws_s3.go @@ -83,7 +83,10 @@ func (*AwsS3) DeleteFile(key string) error { // newSession Create S3 session func newSession() *session.Session { sess, _ := session.NewSession(&aws.Config{ - Region: aws.String(global.GVA_CONFIG.AwsS3.Region), + Region: aws.String(global.GVA_CONFIG.AwsS3.Region), + Endpoint: aws.String(global.GVA_CONFIG.AwsS3.Endpoint), //minio在这里设置地址,可以兼容 + S3ForcePathStyle: aws.Bool(global.GVA_CONFIG.AwsS3.S3ForcePathStyle), + DisableSSL: aws.Bool(global.GVA_CONFIG.AwsS3.DisableSSL), Credentials: credentials.NewStaticCredentials( global.GVA_CONFIG.AwsS3.SecretID, global.GVA_CONFIG.AwsS3.SecretKey,