I have made many search on how to upload files from a form with Ajax, and found out that xhr2 should be able to do it. Yet, I have tried myself to use FormData objects and i
Try to replace the code:
data = new FormData($('#form'));
with this:
data = new FormData($('#form')[0]);
to get the first DOM element from the jQuery array.