I am using aws-sdk can I upload images without using aws amplify I'm using expo's ImagePicker module to select the image how can I put selected image from local file path to s3.
React native Fetch API should work with AWS Signed URL
You can upload any resources into your S3 without credentials or external libraries if you have signed url.
Related
I'm trying to create a webapp for uploading some files, I created an amplify app (react) with a storage hooked up, now I would like to work the files either before being uploaded or after, to split and retrieve only some pages,
I confess that I don't know where to start to get this result, could you advise me where to start without using lambda
I followed the amplify guides to build the app and storage, and I used this component to upload files:
https://ui.docs.amplify.aws/react/connected-components/storage/fileuploader
how can i get the result?
where should i start from?
I'm able to download a file from S3 in a react native app with AWS Amplify backend using the storage.get function. However, not able to find where the downloaded files are stored? How can we access the downloaded files content in react native? The Amplify documentation doesn't say where are the files downloaded by default.
Answering my own question. Storage.get has an option to set download to true to download the files. However, I was not able to find the location of the downloaded files. Hence, I switched to getting the signed url first with storage.get by setting download to false and the use the axios to download the file using http get method by passing the signed url.
const signedURL = await Storage.get('test.json');
const response = await axios.get(signedURL);
console.debug('S3 data: ', response.data);
I have videos stored in a protected bucket on S3. I am able to retrieve the URLs in my React Native application using Amplify:
Storage.get(route.params.organizerVideoS3Keys, { level: "protected"})
.then((result) => {
console.log("result", result);
setOrganizerVideo(result);
})
However, when I put this url into the Expo Video component, nothing shows up. I am able to download the video onto my computer via this url (I am not able to open it, it "isn't compatible with QuickTime Player) so I think the problem is in the way I am attempting to display the video.
My question: how do I take this url and display the video in my React Native app?
some notes:
-when I download the video it is a .mov file
-as shown above, the video is in a protected level on S3
-currently I am using Expo
Thank you.
I am sending structured messages via the Messenger Mobile App (tested on Android, likely the same issue exists on iOS) and images that are loaded from AWS S3 are not displayed in the app!
However, images are loaded properly on Facebook Messenger Desktop version & and in the Chat window in Facebook. The problem only exists on the mobile app.
As suggested here How to send an image hosted on Amazon S3 through the Facebook Messenger Send API? I have set my content type on AWS S3 to "image/jpeg".
As suggested here Messenger not displaying images in Generic template in mobile App I have named my S3 bucket without dots. Image names i am trying to load have no whitespaces. The image path I am trying to load looks like this: https://s3.amazonaws.com/imagestorage/7892160241445363image1.jpg
I have whitelisted aws s3 domain.
I'm attempting to build a Rails application that uses Amazons S3 service. I'm able to upload images to my bucket but when I try to display them in a browser window my image is downloaded to my computer instead of being shown in the browser which is what I want.
https://s3.amazonaws.com/skateparks/b_72e3d8d31fc4263f40b6.png
Set the Content-Type header when you upload the image to S3.