Here is a simple nodejs code snippet for uploading a file to Amazon S3 without writing to disk. It can be used for uploading a file to S3 in two ways.
- Directly upload from BLOB
- Upload from URI
For the URI method:
- Initial a GET Request to a given URI to fetch data
- Pipe the data to S3 service
- During the piping, it can also execute a callback function to send the S3 response back.
原文發表於 Medium