I want to automate an Attachment application which is set up of 2 requests :
Here, in the second request, I want to upload a video (MP4) file. The file is already part of the project. I tried in a way like :
string filePath = "~\\SampleVehicalVideo.mp4";
byte[] array = File.ReadAllBytes(filePath);
HttpResponseMessage response = await client.PutAsync(attachmentURI, new ByteArrayContent(array .ToArray()));
But this is not working. Please help!!!
I would like to update that, I am able to upload an mp4 file over an EDS URI with following code
byte[] array = File.ReadAllBytes(filePath);
HttpResponseMessage response = await client.PutAsync(attachmentURI, new ByteArrayContent(array .ToArray()));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.