简体   繁体   中英

AJAX form submit with file upload

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.

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM