File Upload to AWS S3 Bucket

Hi Syncfusion, 

How do I use the UploaderComponent to upload any file to AWS S3 Bucket.

I was attempting to use this npm package react-aws-s3.

Thank you.


3 Replies 1 reply marked as answer

UD UdhayaKumar Duraisamy Syncfusion Team October 3, 2022 12:36 PM UTC

Hi Wilfred,


We have prepared the sample to upload the files directly to the Amazon S3 bucket using presignedURL.



The sample prepared based on the below forum guideline.

https://aws.amazon.com/blogs/compute/uploading-to-amazon-s3-directly-from-a-web-or-mobile-application/


In the above blogs, provide guidance to upload the image alone directly with unique image name.



But, we have modified the code to upload the all kind of files with their original name. We have achieved this requirement by passing the original file name as additional parameter to the GET request. In lambda function, we received the original file name in the queryStringParameters and made presigned URL with this file name.



Please find the sample on below location.

https://www.syncfusion.com/downloads/support/directtrac/general/ze/s3-direct-upload_(2)412128566.zip


Lambda functions code available in the following locations


Steps to run the sample :

  • Run the npm install command.
  • Add your API END POINT on the `s3-direct-upload\src\components\Upload.js` file.
  • Add your S3 bucket name on the `s3-direct-upload\src\getSignedURL\LambdaFunction.js` file.
  • Run the npm start command.



Regards,

Udhaya Kumar D



Marked as answer

WI Wilfred October 22, 2022 09:34 AM UTC

Hi Udhaya Kumar D,


Thank you so much. 

I have successfully implemented the upload following the answers you gave.


God bless you.




UD UdhayaKumar Duraisamy Syncfusion Team October 24, 2022 07:36 AM UTC

Hi Wilfred,


We are glad that your requirement has been fulfilled on your end. We are always happy to assist you.


Regards,

Udhaya Kumar D


Loader.
Up arrow icon