Hi,
Using the below UploadFile function, trying to upload a document. But receiving the error: {"ERROR":"Invalid URL specified !!"}.
What correction is required to upload the document successfully.
public async Task<string> UploadFile()
{
var retunVal = "";
using (HttpClient httpClient = new HttpClient())
{
{
request.Properties.Add("filename", "Untitled.jpg");
using (FileStream fstream = File.Open(@"C:\Users\jharikrishna\Desktop\Untitled.jpg", FileMode.Open))
{
request.Properties.Add("content", fstream);
retunVal = await (await httpClient.SendAsync(request)).Content.ReadAsStringAsync();
}
}
}
return retunVal;
}