Skip to content

Conversation

@BOPOHA
Copy link

@BOPOHA BOPOHA commented Nov 1, 2021

No description provided.

} else {
options = append(options, server.UseStorage(storage))
}
case "s3-ec2role": // using AWS IAM Role and EC2 Profile
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not really needed.

you should rather add something like s3-credentials-type config param, default to access-key and refactor

func NewS3Storage(accessKey, secretKey, bucketName string, purgeDays int, region, endpoint string, disableMultipart bool, forcePathStyle bool, logger *log.Logger) (*S3Storage, error) {
and https://github.com/dutchcoders/transfer.sh/blob/main/server/utils.go#L43

Copy link
Collaborator

@paolafrancesca paolafrancesca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comment, thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants