Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend configuration settings for s3 #673

Closed
pallid opened this issue Jun 26, 2021 · 4 comments
Closed

Extend configuration settings for s3 #673

pallid opened this issue Jun 26, 2021 · 4 comments

Comments

@pallid
Copy link

pallid commented Jun 26, 2021

Is your feature request related to a problem? Please describe.
Extend configuration settings for s3...

Describe the solution you'd like

  • use path-style addressing, ex. http://s3.amazonaws.com/BUCKET/KEY.
  • option for disable SSL when sending requests
  • option for setting Region

draft solution
file s3.go:

// Init initializes the media handler.
func (ah *awshandler) Init(jsconf string) error {
        ////
        // remove check of the set region
        // if ah.conf.Region == "" {
	// 	return errors.New("missing Region")
	// }
       ////
       
      if sess, err = session.NewSession(&aws.Config{
		Region:                 aws.String(ah.conf.Region),
		Credentials:          credentials.NewStaticCredentials(ah.conf.AccessKeyId, ah.conf.SecretAccessKey, ""),
		// new block ++ {
                DisableSSL:           aws.Bool(ah.conf.disableSSL),
		S3ForcePathStyle: aws.Bool(ah.conf.s3ForcePathStyle),
		Endpoint:              aws.String(ah.conf.Endpoint),
               // new block -- }
	}); err != nil {
		return err
	}

       ////
@or-else
Copy link
Contributor

or-else commented Jun 26, 2021

use path-style addressing, ex. http://s3.amazonaws.com/BUCKET/KEY.

I don't understand this one.

option for disable SSL when sending requests
option for setting Region

OK

@pallid
Copy link
Author

pallid commented Jun 26, 2021

use path-style addressing, ex. http://s3.amazonaws.com/BUCKET/KEY.

I don't understand this one.

field S3ForcePathStyle and Endpoint in struct Config

https://github.com/aws/aws-sdk-go/blob/main/aws/config.go#L127

@or-else
Copy link
Contributor

or-else commented Jun 26, 2021

Ok

or-else added a commit that referenced this issue Jun 26, 2021
@or-else
Copy link
Contributor

or-else commented Jul 13, 2021

Released. Closing.

@or-else or-else closed this as completed Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants