Uploading a file with XMLHttprequest - Missing boundary in multipart/form-data Uploading a file with XMLHttprequest - Missing boundary in multipart/form-data php php

Uploading a file with XMLHttprequest - Missing boundary in multipart/form-data


Well this is strange a little bit for me, but this is what worked:

// Openxhr.open('POST', this.options.action, true);// !!! REMOVED ALL HEADERS// Sendxhr.send(formData);

In this case, on server side I don't read the file sent via php://input but the file will be in the $_FILES array.

This solved my problem, but I'm still curious why appears now the file in $_FILES?

Tested in Chrome, Mozilla, Safari, and IE10.