I\'m trying to use XMLHttpRequest to send a file object and a string (CSRF Token) to the server but I cant seem to figure out how to add the token:
xhr.open(\"PO
Why don't you just add
xhr.setRequestHeader('X-CSRF-TOKEN', '<YOURTOKENHERE>');
before xhr.send() ?
As far as I understand your problem, this should solve it. (Might be I misunderstood, though)