jaredramirez / elm-s3

Uploading files to S3 quick and easy
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Support buckets with dots in names #4

Open zoul opened 4 years ago

zoul commented 4 years ago

Currently the upload URL is constructed from the bucket name and the AWS host:

url =
    interpolate """https://{0}.{1}"""
        [ record.bucket
        , record.awsS3Host
        ]

This doesn’t work for buckets that have dots (.) in their names. According to this it should be possible to use an alternate URL format to upload:

https://s3-{region-name}.amazonaws.com/{bucket-name}

This has the advantage of working even for buckets with dots. Could we switch to this URL format?