Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a blob which is currently in my browser temp file, and i would like to send it to a web service. i tried the following code with no luck.

C#
var xhr = new XMLHttpRequest();
    fd = new FormData(document.getElementById("save"));
    fd.append('file', $('#file')[0].files[0]);
    xhr.open("POST", "http://localhost/TestWebService/", true);
    xhr.onreadystatechange = handler;

    xhr.send(fd);
Posted

1 solution

It seems that your URL isn't complete...
See this MDN sample: https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900