aws-s3
aws-s3 copied to clipboard
Fixing issue: #45 Invalid URL in region us-east-1
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)
Can you please update your branch and keep the switch statement instead of the if statement
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.
Using countryCode is the better way IMO,
case countryCode === us then format the url
FYI - at the rate this is maintained, you're best off using the plain-jane aws-sdk
@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