Compare Revisions

Using files from web applications

Change Revisions

Revision 36082:

Revision 36082 by Sheppy on

Revision 36083:

Revision 36083 by ing.marco.buratto 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 36082
Revision 36083
n266  var fileData = file.getAsBinary(); // works on TEXT data.n266  var fileData = file.getAsBinary(); // works on TEXT data ONLY.
n278  if (xhr.readyState == 4) {n278    if (xhr.readyState == 4) {
279    if ((xhr.status >= 200 && xhr.status <= 200) ||279      if ((xhr.status >= 200 && xhr.status <= 200) 
> xhr.status == 304) {>|| xhr.status == 304) {
280      // Handle response.280        
281      if (xhr.responseText != "") {281        if (xhr.responseText != "") {
282        alert(xhr.responseText);282          alert(xhr.responseText); // display response.
283        }
t288  body += "Content-Disposition: form-data; name='catalogueFile'; t289  body += "Content-Disposition: form-data; name='fileId'; filenam
>filename='" + fileName + "'\r\n";>e='" + fileName + "'\r\n";

Back to History