Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HTTPRequest myRequest = new HTTPRequest (new Uri("url"), HTTPMethods.Post);
- myRequest.Credentials = new BestHTTP.Authentication.Credentials (user,pass);
- string content = "";
- BestHTTP.Forms.HTTPMultiPartForm Form = new BestHTTP.Forms.HTTPMultiPartForm ();
- //Directory
- string filename = DateTime.UtcNow.ToString("yyyy-MM-dd HH-mm-ss");
- Form.AddField ("dirName", filename);
- //Send General Info Csv
- Form.AddField("info","stuff here");
- //Generate Actions CSV
- Form.AddField ("tracking", "more stuff");
- Form.AddBinaryData ("video", File.ReadAllBytes (Application.persistentDataPath + "/" + VideoFile + ".mp4"), VideoFile + ".mp4", "video/mp4");
- myRequest.SetForm (Form);
- myRequest.ConnectTimeout = new TimeSpan(0,10,0);
- myRequest.Timeout = new TimeSpan(0,10,0);
- myRequest.Send ();
- yield return myRequest;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement