using XMLHttpRequest send file with data
var file = $("#file_input")[0].files[0];
var formData = new FormData();
formData.append("myfile", file);
formData.append("text_unput", "Hello");
var xhr = new XMLHttpRequest();
xhr.open('POST', '/url', true);
xhr.send(formData);