Skip to content

Extend configuration settings for s3 #673

Closed
@pallid

Description

@pallid

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
	}

       ////

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions