benjreinhart / react-native-aws3

Pure JavaScript React Native library for uploading to AWS S3
MIT License
399 stars 151 forks source link

allow custom region url #20

Closed markudevelop closed 7 years ago

markudevelop commented 7 years ago

I can't use the package without changing it to url: 's3-eu-west-1.amazonaws.com', so it will be great if this can be merged

benjreinhart commented 7 years ago

Cool, thank you!

Hmm, it'd be great if we could use the region option, since it appears to sometimes (always?) be the same as the subdomain you need. That being said, it seems I can't resolve us-east-1.amazonaws.com or s3-us-east-1.amazonaws.com, so guessing that won't always work?

However, if using the region option is not going to work, it would be nice if we could rename the url to something less vague, maybe awsUrl or regionUrl? Thoughts?

markudevelop commented 7 years ago

@benjreinhart, region and the endpoint are not the same so we can't really use it, i changed it to awsURL if thats better? it's actually not really a region url it's just the aws s3 url images are also accessed from it. so I think it makes sense?

benjreinhart commented 7 years ago

👍

benjreinhart commented 7 years ago

I'll pull this into my app in a bit, test it, then deploy to NPM if it's all good.