aws-s3 icon indicating copy to clipboard operation
aws-s3 copied to clipboard

Fixing issue: #45 Invalid URL in region us-east-1

Open Teippo2020 opened this issue 6 years ago • 5 comments

Fixing issue: https://github.com/Fausto95/aws-s3/issues/45 When the region is us-east-1 the URL should be built in another way than the other regions (regions in China do not apply this rule)

Teippo2020 avatar Feb 27 '19 18:02 Teippo2020

Can you please update your branch and keep the switch statement instead of the if statement

Fausto95 avatar Feb 28 '19 12:02 Fausto95

I don't see any problem using the if statement, besides, we use two different variables countryCode and region. I think an if/else seems more readable than a switch in this case.

Teippo2020 avatar Mar 01 '19 01:03 Teippo2020

Using countryCode is the better way IMO, case countryCode === us then format the url

Fausto95 avatar Mar 01 '19 08:03 Fausto95

FYI - at the rate this is maintained, you're best off using the plain-jane aws-sdk

jpwiddy avatar Jun 04 '19 22:06 jpwiddy

@Fausto95 Switch won't work in this case since we are only aware 'us-east-1' causes the problem. using countryCode === 'us' might raise issues for other users

wvicioso avatar Sep 17 '19 00:09 wvicioso