ajax formdata : Illegal invocation

Solution 1:

jQuery tries to transform your FormData object to a string, add this to your $.ajax call:

processData: false,
contentType: false

Solution 2:

it occurs sometime when jquery internally not serialize data correctly data to fix it add this.

cache : false,
dataType    : 'json',
processData : false,