Skip to content

Instantly share code, notes, and snippets.

View spandan114's full-sized avatar
📚
Learning

spandan joshi spandan114

📚
Learning
View GitHub Profile
@katendeglory
katendeglory / react-node-aws-s3-presigned-url.js
Last active July 19, 2023 20:01
How to PUT/GET Files to aws S3 directly from a React Client using a generated pre-signed url endpoint
// NODE-JS SIDE------------------------------------------------------------------------------------
const AWS = require('aws-sdk');
const s3 = new AWS.S3();
AWS.config.update({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
});