Large file upload though html form (more than 2 GB)

Nadeem Ullah picture Nadeem Ullah · Feb 19, 2011 · Viewed 70.1k times · Source

Is there anyway to upload a file more than 2 GB, using simple html form upload? Previously I have been uploading large files through silverlight using chunking (dividing a large file into segments and then uploading segments one by one & then reassemble segments at server).

Now, we have a requirement that we just have to use simple html (though GWT) form uploads. Please guide me if there is any way to achieve large file upload this way.

If it is impossible to do it using simple html, can anyone guide me about how I can divide & upload a file in segments using flex?

Answer

kongaraju picture kongaraju · Jun 1, 2012

Use HTML5 File API to upload large files. which has the concept of slicing, so that you can upload large files.

var reader= new FileReader();
reader.onload=function(e){

//do whatever you want with result
}
var blob = file.slice(startingByte, endindByte);//slicing file
reader.readAsBinaryString(blob);

FileSystem Tutorial

File API tutorial