JS file with streaming, that is, without loading the entire file into memory

Something like the MDN described on this page , but without loading the file into memory, that is, I would like to be able to send the file in pieces using some streaming interface so that my client process does not depend on the file size. The file is selected using an invisible element <input type=file>.

This is a real world problem: my users will upload several files at once, which can be large enough (and limited enough on client devices) to worry about memory consumption. At the same time, I would like to provide a nice client server with an indication of progress.

The FileReader interface does not seem to support streaming unless I miss something.

The solution should work in the latest versions of Safari, Chrome and Firefox and, if possible, also in IE9 (although there is probably little hope). Edit: also no jQuery, just plain JavaScript.

+5
source share
1 answer

The only thing I know that has all these features (multiple file downloads, loading the contents of the file, download indicator, etc.) uses jQuery, although it is called jQuery File Upload Plugin , here go url:

http://blueimp.github.com/jQuery-File-Upload/

0
source

All Articles