Rectangle 27 0

javascript PHP HTML5 API upload corrupted?


Looking at the answer provided by user470714 on uploading a file in chunks using html5 I found the issues.

Which the ajax didn't actually uploading the chunks in order. So I updated my HTML code as follow and now it works fine :

Note
Rectangle 27 0

javascript PHP HTML5 API upload corrupted?


First of all, why do you want to separate the file into chunks? You can upload the whole file in a go via AJAX. The error that you are encountering might be due to the chunk logic. Try removing the chunk logic and it will work just fine. So your upload function would look something like this:

Instead of chunks, send the full file and it should work. If you are worried about the upload progress, here are a few solutions: jQuery Upload Progress and AJAX file upload , File upload progress bar with jquery

Its because I want this function to upload a large file. which, if not in the chunk, 32 bit server can't upload more then 2gb in total of data.

Note