Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen sending a file via AJAX, does it get read into memory first?
    primarykey
    data
    text
    <p>I'm writing an uploader that has to be able to transmit files of any size (up to 30gigs) to the server.</p> <p>My original intention was to write a java applet that would break the file up into pieces, send those to the server, and then reassemble them there.</p> <p>However, someone has suggested that AJAX's XMLHttpRequest can do the job in conjunction with nsIFileInputStream (example here: <a href="https://developer.mozilla.org/en/using_xmlhttprequest#Sending_files_using_a_FormData_object" rel="nofollow">https://developer.mozilla.org/en/using_xmlhttprequest#Sending_files_using_a_FormData_object</a> ) and by using PUT instead of POST.</p> <p>I'm worried about 2 things and can't seem to find the answer.</p> <p>1) Will AJAX attempt to read the file into memory before sending it (that obviously would break the whole thing)</p> <p>[EDIT] This <a href="http://www.codeproject.com/KB/ajax/AJAXFileUpload.aspx?msg=2329446" rel="nofollow">http://www.codeproject.com/KB/ajax/AJAXFileUpload.aspx?msg=2329446</a> example explicitly states that they're using ActiveXObject because that DOESN'T load the file into memory... which suggests to me that XMLHttpRequest would load it into memory. I'm surprised I'm having such a hard time finding this info, to be honest. </p> <p>2) How reliable is this approach. I realize that if the connection just dies the upload would have to resume from scratch, but realistically, how likely is it that using a standard cable connection with an upload throttle of about .5MB/s that a 30 gig file would arrive at the server?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload