tags:

views:

33

answers:

3

Hi guys, I can't upload a file with asynchronous ajax but can I with the synchronous method ? I searched and found nothing about it.

Thanks.

+1  A: 

No. You need to upload through a regular form. The only "ajax" upload plugins I've seen create an iframe dynamically through javascript and reconstruct the form in it and submit it through the iframe like your browser would normally.

Jage
+2  A: 

No, you can not with pure Ajax. However, there are many hidden IFRAME based solutions that mimic the exact behavior. Here is one example: http://www.openjs.com/articles/ajax/ajax_file_upload/

UPDATE

Here is another implemented as a jQuery plugin: http://www.phpletter.com/Demo/AjaxFileUpload-Demo/

Mike Sherov
A: 

For asynchronous fileupload, try something like uploadify

doep