¡@

Home 

2014/10/16 ¤W¤È 12:02:14

jquery Programming Glossary: blobfile

How to upload a file using jQuery.ajax and FormData

http://stackoverflow.com/questions/9622901/how-to-upload-a-file-using-jquery-ajax-and-formdata

FormData . However when I switch to jQuery.ajax my code breaks. This is the working original code function uploadFile blobFile fileName var fd new FormData fd.append fileToUpload blobFile var xhr new XMLHttpRequest xhr.open POST upload.php true xhr.send.. This is the working original code function uploadFile blobFile fileName var fd new FormData fd.append fileToUpload blobFile var xhr new XMLHttpRequest xhr.open POST upload.php true xhr.send fd Here is my unsuccessful jQuery.ajax attempt function.. xhr.open POST upload.php true xhr.send fd Here is my unsuccessful jQuery.ajax attempt function uploadFile blobFile fileName var fd new FormData fd.append fileToUpload blobFile var xm .ajax url upload.php type POST data fd What am I doing..