I am trying to acheive s3 multipart upload with pause and resume options. i am using s3-upload-stream npm package for this Check here

It works fine until user closes the application .but when user closes application accidentally means i have to resume the upload manually . so using i am this method as they mentioned.

enter var upload = s3Stream.upload( { Bucket: "bucket-name", Key: "key-name", ACL: "public-read", StorageClass: "REDUCED_REDUNDANCY", ContentType: "binary/octet-stream" }, { UploadId: "f1j2b47238f12984f71b2o8347f12", Parts: [ { ETag: "3k2j3h45t9v8aydgajsda", PartNumber: 1 }, { Etag: "kjgsdfg876sd8fgk3j44t", PartNumber: 2 } ]}); i am saving this Etag , partnumber , upload id in db.

But resuming by this way does not works.

i think the parts already upload also uploading again by this way . because after upload the uploaded file size is larger than original file size and also upload file is correpted not able to open ??

what am i missing , Please help guys !!

0 Answers