mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
Revert "feature (plg_backend_s3): add param for forcePathStyle - #584"
This reverts commit 67e2a34853.
This commit is contained in:
parent
c7cd48ce90
commit
f15eae8b5a
1 changed files with 6 additions and 15 deletions
|
|
@ -75,7 +75,7 @@ func (s S3Backend) Init(params map[string]string, app *App) (IBackend, error) {
|
||||||
config := &aws.Config{
|
config := &aws.Config{
|
||||||
Credentials: credentials.NewChainCredentials(creds),
|
Credentials: credentials.NewChainCredentials(creds),
|
||||||
CredentialsChainVerboseErrors: aws.Bool(true),
|
CredentialsChainVerboseErrors: aws.Bool(true),
|
||||||
S3ForcePathStyle: aws.Bool(params["url_style"] == "path-style"),
|
S3ForcePathStyle: aws.Bool(true),
|
||||||
Region: aws.String(params["region"]),
|
Region: aws.String(params["region"]),
|
||||||
}
|
}
|
||||||
if params["endpoint"] != "" {
|
if params["endpoint"] != "" {
|
||||||
|
|
@ -113,13 +113,7 @@ func (s S3Backend) LoginForm() Form {
|
||||||
Name: "advanced",
|
Name: "advanced",
|
||||||
Type: "enable",
|
Type: "enable",
|
||||||
Placeholder: "Advanced",
|
Placeholder: "Advanced",
|
||||||
Target: []string{"s3_endpoint", "s3_role_arn", "s3_path", "s3_session_token", "s3_encryption_key", "s3_region", "s3_url_style"},
|
Target: []string{"s3_role_arn", "s3_path", "s3_session_token", "s3_encryption_key", "s3_region", "s3_endpoint"},
|
||||||
},
|
|
||||||
FormElement{
|
|
||||||
Id: "s3_endpoint",
|
|
||||||
Name: "endpoint",
|
|
||||||
Type: "text",
|
|
||||||
Placeholder: "Endpoint",
|
|
||||||
},
|
},
|
||||||
FormElement{
|
FormElement{
|
||||||
Id: "s3_role_arn",
|
Id: "s3_role_arn",
|
||||||
|
|
@ -152,13 +146,10 @@ func (s S3Backend) LoginForm() Form {
|
||||||
Placeholder: "Region",
|
Placeholder: "Region",
|
||||||
},
|
},
|
||||||
FormElement{
|
FormElement{
|
||||||
Id: "s3_url_style",
|
Id: "s3_endpoint",
|
||||||
Name: "url_style",
|
Name: "endpoint",
|
||||||
Type: "select",
|
Type: "text",
|
||||||
Default: "path-style",
|
Placeholder: "Endpoint",
|
||||||
Opts: []string{"path-style", "virtual-hosted–style"},
|
|
||||||
Description: "Amazon S3 supports both virtual-hosted–style and path-style URL access in all AWS Regions. Default: \"path-style\"",
|
|
||||||
Placeholder: "S3 URL Style",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue