banner



How To Upload Images In S3 Bucket Using React

Upload images on a React app to AWS S3 Bucket

Create & Config an S3 Bucket

          <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>

Back to React Application

          const config = {                      bucketName: 'Enter Your bucket Name ',                      dirName: 'Enter Binder Proper noun ', /* optional */                      region: 'Enter Your Bucket region',                      accessKeyId: 'Enter accessKeyId hither',                      secretAccessKey: 'Enter secretAccessKey'          }        

Source: https://medium.com/@rachid1982fsb/upload-images-on-a-react-app-to-aws-s3-bucket-3f3114a683f1

Posted by: kinghossing.blogspot.com

0 Response to "How To Upload Images In S3 Bucket Using React"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel