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