RestSharp Post Method to Upload Video File to PHP API

175 views
Skip to first unread message

sandeep singh

unread,
Mar 7, 2018, 1:21:15 PM3/7/18
to RestSharp
I am new to RestSharp, using C# WPF, i want to upload a video (mp4) file to server using PHP API and RestSharp.


var Client = new RestClient("https://www.XXXX.com/");
               
var Request = new RestRequest("FILE.php", Method.POST);
               
Request.AddParameter("uniqueID", DeviceID);
               
Request.AddParameter("POSTID", POSTID);
               
Request.AddParameter("outPutVideoPath", outPutVideoPath);
               
Request.AddParameter("accesstoken", "TOKEN");

This is not uploading file.

Please advice.

Thanks

Reply all
Reply to author
Forward
0 new messages