I have a function that makes an API request containing the URL of a new file I just uploaded to AWS S3. And I have one function that only upload the file to S3. I am having issues with returning this URL of the uploaded file. Here is my code: Here is the SDK doc with the upload example: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property
Tag: amazon-s3
Json Array Pushes Data Twice to File Tree with React
When pushing data into a file tree, it pushes 2 sets of the same data and I am not exactly sure why. I have a simple json array that looks like this: I am trying to push 4 files I have into it like this by calling this function: This is how addFileToTree is being called: The result has been
Empty image when uploading to presigned AWS S3 url in React Native
I’m trying to upload image to AWS S3 in my React Native(expo managed workflow), but in result the file is empty. I don’t get any errors through the process. I’ve also tried to upload it using Uppy AWS plugin, but result is the same. Here is my code: I am using expo image picker to get the file. I’ve also
Language detection in the path and query string works incorrectly on AWS s3 bucket
I am working on React web app and I use i18n and i18next-browser-languagedetector for translation the app. On my local all works fine, even on server all is works in the same way. But I have a problem on aws s3 bucket. After I build my react project and upload it to s3 bucket i18n stop working correctly. I am
Nextjs static files CORS issue – Causing links to break on version 10.1.4
My current Nextjs app is pulling its static files from Cloudfront. (I upload the /static folder to S3 during the deployment) Since updating to version 9 I am facing a weird issue where some of my CSS files are getting the following CORS error: After updating Nextjs to version 10.1.4, all the links of the app stopped working. This is
AWS S3 update image using pre-signed URL (Axios-PUT Request)
I’m trying to update a local JPG image file into an S3 bucket using the REST PUT request and Axios. I managed to send the PUT request and to get a positive answer from AWS S3 Service but what it’s been upload is not a JPG file but a JSON file. This is the code that I’m using: I have
React-Router locations on AWS s3 bucket do not work
I have my static react app hosted in an AWS s3 bucket. It renders fine. However, I am utilizing react-router-dom to navigate between “pages.” (I have enabled public access, enabled static website hosting, listed my index document as index.html). For example, my bucket website endpoint is http://<bucketname.s3-website-us-east-1.amazonaws.com. When I click on one of my navigation buttons which links to http://<bucketname.s3-website-us-east-1.amazonaws.com/Support,
How to track upload progress to S3 using aws-sdk V3 for browser (javascript)
I can find a lot of resources online on how to track upload progress to S3 using aws-sdk V2, listening to the event like: But since I updated the aws-sdk to V3, there are no listeners anymore. I believe I have to use the middleware function now, but I’ve tried a few things and it didn’t work. I’ve also went
AWS S3 REST API “RequestTimeTooSkewed” Error
I am attempting to initiate a multipart upload to an s3 bucket directly from the browser by following the corresponding AWS Docs. However, I’m receiving the following response error: Am I mistaken or are these times in fact within the 9000 millisecond skew cap in which AWS deems a request time valid? After console logging the times for better analysis
Upload to AWS S3 got 403 Forbidden – Solved by remove “ACL” in param
I was developing the frontend using React.js, and I use Javascript SDK for uploading a file to my S3 bucket using my root AWS account. I followed the official doc but kept getting 403 Forbidden. If you encounter the same case, you can try to remove the “ACL” in params while uploading to solve it. I basically followed the demo