Amazon Simple Storage Service is also known as Amazon S3. It is highly scalable object storage in the cloud securely.
It is used to store any amount of data.
MultiPart form uploading to AWS
S3 is Object Storage with a simple web service interface to store and retrive any amount of data from anywhere on the web.
What is multi part upload ?
1. Initiate the Multi part Upload
2. Seperate the object into multiple parts.
3. Upload the parts in any order, one at a time or in the parallel.
Date transmission - Browser going to App server and going to S3.
https://s3.amazonaws.com/upload-demo-images/5e64truyt47653745tr46tr736t4rt4r3t46
Nodejs code :
Install the dependencies.
npm install s3-stream-upload
var UploadStream = require("s3-stream-upload");
var S3 = require("aws-sdk").S3;
var key = "file.mp3";
var s3 = new S3();
fs.readFileStream(__dirname + "/file.mp3")
.pipe(UploadStream(s3, { Bucket: "my-S3-bucket", Key: key }))
.on("error", function (err) {
console.error(err);
})
.on("finish", function () {
console.log("File uploaded!");
});
my sample s3 url - 'https://s3.amazonaws.com/upload-demo-images/';
It is used to store any amount of data.
MultiPart form uploading to AWS
S3 is Object Storage with a simple web service interface to store and retrive any amount of data from anywhere on the web.
What is multi part upload ?
1. Initiate the Multi part Upload
2. Seperate the object into multiple parts.
3. Upload the parts in any order, one at a time or in the parallel.
Date transmission - Browser going to App server and going to S3.
https://s3.amazonaws.com/upload-demo-images/5e64truyt47653745tr46tr736t4rt4r3t46
Nodejs code :
Install the dependencies.
npm install s3-stream-upload
var UploadStream = require("s3-stream-upload");
var S3 = require("aws-sdk").S3;
var key = "file.mp3";
var s3 = new S3();
fs.readFileStream(__dirname + "/file.mp3")
.pipe(UploadStream(s3, { Bucket: "my-S3-bucket", Key: key }))
.on("error", function (err) {
console.error(err);
})
.on("finish", function () {
console.log("File uploaded!");
});
my sample s3 url - 'https://s3.amazonaws.com/upload-demo-images/';