What is multi-part video upload and how it is done in asp.net.
I have used below code to create project and get list using API
HttpWebRequest wRequest = (HttpWebRequest)WebRequest.Create("apiurl?paramerters");
wRequest.Method = "POST";
string credentials = String.Format("{0}:{1}", "username", "password");
byte[] bytes = Encoding.ASCII.GetBytes(credentials);
string base64 = Convert.ToBase64String(bytes);
string authorization = String.Concat("Basic ", base64);
wRequest.Headers.Add("Authorization", authorization);
wResponse = (HttpWebResponse)wRequest.GetResponse();
if (wRequest.HaveResponse)
{
string response = (new StreamReader(wResponse.GetResponseStream())).ReadToEnd();
if (wResponse.StatusCode == HttpStatusCode.OK)
{
dsResponse.ReadXml(new MemoryStream(Encoding.UTF8.GetBytes(WistiaResponse)));
if (dsResponse.Tables.Count > 0)
{
dtResponse = dsResponse.Tables[0];
}
else
{
dtResponse = null;
}
}
}
I am using Upload API from here: "http://wistia.com/doc/upload-api"
how to do uploading
I can't test it (as I don't have an account there), but general code should look like this:
Where
apiPassword
,projectId
,contactId
andname
are parameters described in API documentation, whileMyPath\MyWistiaFile.ext
is path to the file you want to upload.