Solution:
I
test it and works for me, the idea was build all the post source code and send it like this:
var BOUNDARY = "myMark------"+(new Date).getMilliseconds();
var source = '';
source += "--" + BOUNDARY + "\r\n" + "Content-Disposition: form-data; name=\"fileNameInAction\"";
source += '; filename="' + file.name + '"' + "\r\n" + 'Content-type: ' + file.type;
source += "\r\n" + "\r\n" + file.getAsBinary() + "\r\n";
req += "--" + BOUNDARY + '--';
httpRequest.open("POST","action.action");
httpRequest.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
httpRequest.sendAsBinary(req);