Upload a file to S3 without writing to disk
1 min readJan 18, 2018
Here is a simple nodejs code snippet for uploading a file to Amazon S3. It can be use for uploading a file to S3 in two ways.
- Directly upload from BLOB
- Upload form URI
- Initial a GET Request to a given URI to fetch data
- Pipe the data to S3 service
- Durning the piping, it can also execute a callback function to send the S3 response back.