Created
March 6, 2022 11:41
-
-
Save SalvoCozzubo/2077a50a554fbc6c0cd8dee15413e896 to your computer and use it in GitHub Desktop.
Upload a file in S3 in Nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uploadFile = async () => { | |
const params = { | |
Bucket: process.env.BUCKET, | |
Key: 'file-upload.txt', | |
Body: 'hello world', | |
}; | |
const upload = new Upload({ | |
client, | |
params, | |
}); | |
return upload.done(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment