Is there a plugin to get jQuery.ajax to send multipart / form-data?

I need this so that I can present a subset of form controls that contain ASCII-free text.

A solution with an iframe will not work for me, as it represents the whole form; I just want to introduce a subset of the controls.

I know that I can build the multipart / form-data line myself, but it seems that this should have been done before ...

+4
source share
2 answers

I would recommend using jQuery and the Form plugin: http://malsup.com/jquery/form/#api

You can use the fieldSerialize() method to send only a subset of the form and iframe:true so that it works with sending files, etc.

Hope this works for you!

+3
source

Update. Starting with version 3.02 (which was released at the beginning of 2012), the jquery.form plugin now processes the ajax file, which is sent much more friendly. Check it out.

0
source

All Articles