benjreinhart / react-native-aws3

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

Allow s3 urls to be set as path instead of subdomain + automatic region URL #44

Open HommeSauvage opened 7 years ago

HommeSauvage commented 7 years ago

When using a bucket name that looks like a domain name, the TLS security hits and blocks the request, this can be fixed when using react-native alone by lowering some security checks, but on an expo project, there's no fix. This will add an option: urlAsPath which which change s3 upload url from my.bucket.com.s3.amazonaws.com to s3.amazonaws.com/my.bucket.com.

In addition, I made the region url to be generated automatically.