s3-multipart-upload-browser icon indicating copy to clipboard operation
s3-multipart-upload-browser copied to clipboard

Wrong partNumber with each request

Open ilatif opened this issue 11 years ago • 3 comments

I tested your library and I must say it is awesome. Server Side is implemented in an elegant way and saves a lot of time for developers like me who are not familiar with Amazon SDK.

Your JavaScript implementation contains a bug. It send each request with last partNumber and not by each individual partNumber. For example if I have set PART_SIZE to 10 KB and I try to upload a file of 30 KB then with each request of file slice it is sending partNumber as 3.

I have reproduced this issue with different PART_SIZE and file size.

ilatif avatar Aug 16 '13 16:08 ilatif

Can you look into that issue and fix it? That will be great. I am currently busy with a project.

PS: PART_SIZE should be at least 5 MB as per AWS specification.

ienzam avatar Aug 17 '13 10:08 ienzam

@ienzam Yeah sure. I will definitely look into this issue. I have already spotted the thing which is causing this issue. I have fixed this issue for my needs but my needs are a bit different and I cannot push that code because that will not work :smiley: I will definitely fix this issue and will send you a Pull Request.

My needs are a bit different to upload files. I don't want to fallback to other strategies when user try to upload a file smaller than 5 MB and I' am using same multipart code to upload file if it is smaller than 5 MB and in that case only one Ajax Request will be generated.

I have successfully uploaded files smaller than 5MB to Amazon S3.

ilatif avatar Aug 17 '13 10:08 ilatif

:+1:

ienzam avatar Aug 17 '13 11:08 ienzam