XMLHTTPRequest method to send files to the server