I\'m trying to serialize my form data including file image field using jquery.form.js jQuery API. The API is helping me to serailze data fields including image
You can use this way (from http://portfolio.planetjon.ca/2014/01/26/submit-file-input-via-ajax-jquery-easy-way/)
$( '#my-form' )
.submit( function( e ) {
$.ajax( {
url: 'http://host.com/action/',
type: 'POST',
data: new FormData( this ),
processData: false,
contentType: false
} );
} );
it's more flexible and easy way