7

I am trying to ajax submit a form that contains file upload area. As I found out JS cannot handle file uploads therefore I am using this plugin -> http://jquery.malsup.com/form/#ajaxForm

However, after submitting the form, I am not getting anything in $_FILES. Does anyone know what is the reason and how I can fix this?

My input field is <input type="file" name="logo" id="logo" /> and yes the form is multipart data.

peterh
  • 11,875
  • 18
  • 85
  • 108

2 Answers2

4

Take a look at http://www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html

PHP Ferrari
  • 15,754
  • 27
  • 83
  • 149
1

use this plugin it uses XHR for uploading multiple files with progress-bar in FF3.6+, Safari4+, Chrome and falls back to hidden iframe based upload in other browsers, providing good user experience everywhere. check this: http://valums.com/ajax-upload/

zamoldar
  • 548
  • 10
  • 13