mozilla

Compare Revisions

Using files from web applications

Change Revisions

Revision 36096:

Revision 36096 by cb1986ster on

Revision 36097:

Revision 36097 by Simon Speich on

Title:
Using files from web applications
Using files from web applications
Slug:
Using_files_from_web_applications
Using_files_from_web_applications
Tags:
Files, HTML5, MakeBrowserAgnostic, "ajax upload", upload
Files, HTML5, MakeBrowserAgnostic, "ajax upload", upload
Content:

Revision 36096
Revision 36097
nn355  var reader = new FileReader();  
n372  n
n375  xhr.sendAsBinary(file.getAsBinary());n375  reader.readAsBinaryString(file);
376  reader.onload = function(evt) {
377    xhr.sendAsBinary(evt.target.result);
378  };
t393      <li>Finally, the <code>XMLHttpRequest</code> function <codet396      <li>The <code>FileReader</code> object is used to convert t
>>sendAsBinary()</code> is called to upload the file's content. <e>he file to a binary string.
>m>This needs to be revised; currently using the deprecated synchr 
>onous getAsBinary() routine to pull the data from the file.</em> 
397      </li>
398      <li>Finally, when the content is loaded the <code>XMLHttpRe
 >quest</code> function <code>sendAsBinary()</code> is called to up
 >load the file's content.

Back to History