Closed brajeshsipl closed 5 years ago
I am using this package to directly upload image to AWS S3 below is my code to upload image
const file = { uri: 'file:///storage/emulated/0/DCIM/image-cd07934e-565d-4f57-9776-0e5fb42b9c9a.jpg', name: "image.jpg", type: "image/jpg" } const options = { bucket: "BUCKET-NAME", region: "REGION", accessKey: "ACCESS-KEY", secretKey: "SECRET-KEY", successActionStatus: 201 } RNS3.put(file, options).then(response => { console.log(response); if (response.status !== 201) throw new Error("Failed to upload image to S3"); console.log(response.body); }).catch((error) => { console.log(error) });
Version :- "react": "16.3.1", "react-native": "^0.55.0", "react-native-aws3": "0.0.8",
Getting this below error:-
{ status: 0, text: 'No route to host', headers: {} }
try adding awsUrl: `s3.${REGION}.amazonaws.com` and see
awsUrl: `s3.${REGION}.amazonaws.com`
i am closing this issue as this issue was due to our ISP server.
I am using this package to directly upload image to AWS S3 below is my
code to upload image
Version :- "react": "16.3.1", "react-native": "^0.55.0", "react-native-aws3": "0.0.8",
Getting this below error:-
{ status: 0, text: 'No route to host', headers: {} }