react-native-aws3
react-native-aws3 copied to clipboard
Unable to upload video when bucket name contains dots eg. domain names
Hi,
First of all, I would like to say that I appreciate your effort to create this library. After some time of using it in my react native application, I noticed that occasional problems occurred while uploading videos to the server. It turned out to be due to the structure of the url variable in the RNS3.js file.
I changed the original structure:
var url =
"http://" +
options.bucket +
"." +
(options.awsUrl || AWS_DEFAULT_S3_HOST);
to:
var url = `https://s3.${options.region}.amazonaws.com/${options.bucket}/`;
and now it is working without any problems.