refile / refile-s3

Amazon S3 Backend for Refile
MIT License
36 stars 88 forks source link

Remove prefixed s3 from client endpoint #30

Closed ekampp closed 8 years ago

ekampp commented 8 years ago

When trying to upload a file I get the following error:

Seahorse::Client::NetworkingError: hostname "bucket-name.s3.s3-eu-west-1.amazonaws.com" does not match the server certificate

This is basically because the url should be bucket-name.s3-eu-west-1.amazonaws.com. As you can see the correct url doesn't contain the .s3. after the bucket name and before the region.

After some debugging og the @s3.client.config I can see that there is an endpoint, which is set to URI("https://s3.#{region}.amazonaws.com").

Setting this to URI("https://#{region}.amazonaws.com") fixes this problem.

ekampp commented 8 years ago

Never mind, I was doing something else incorrectly. Sorry for the inconvenience.