Here we are solving the problem of uploading files to AWS S3 directly using React and React Hooks.
This is the quick start guide to uploading files to react.
- Follow Me
- Clone Repo
- Npm install
- Update .env with your aws S3 bucket info You'll need to get the following things from your AWS S3 Account.
- Access ID.
- Access Key.
- Bucket Name.
- Region
- Directory Name (optional)
**.env file values
-
REACT_APP_ACCESS_ID=XXXXXXXXXXXXX
-
REACT_APP_ACCESS_KEY=XXXXXXXXXXXXX
-
REACT_APP_BUCKET_NAME=XXXXXXXXXXXXX
-
REACT_APP_DIR_NAME=XXXXXXXXXXXXX
-
REACT_APP_REGION=XXXXXXXXXXXXX **
-
Update S3 bucket Cors
-
Success
If you have any questions feel free to read through the guide as well as ask me questions via medium. Medium Article
- LinkedIn: https://www.linkedin.com/in/steven-hofheins/
- Medium: https://medium.com/@steven_creates
- GitHub: https://github.com/StevenCreates
If you end up cloning this more than once please star it