Skip to content

Commit

Permalink
Added original file name to slug http header, so that is shown in You…
Browse files Browse the repository at this point in the history
…tube studio.
  • Loading branch information
Drexel2k committed Apr 30, 2020
1 parent 94af16f commit 450d202
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions VidUp.UI/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
[assembly: System.Reflection.AssemblyProductAttribute("VidUp")]
[assembly: System.Reflection.AssemblyTitleAttribute("VidUp")]
[assembly: System.Reflection.AssemblyCompanyAttribute("Drexel Development")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.0.1")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.1.0")]
//Shown in Gui/Setup
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.0.1")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.1.0.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.1.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.1.1.0")]
[assembly: System.Reflection.AssemblyCopyright("©2020 Drexel Development")]
[assembly: ComVisible(false)]

Expand Down
2 changes: 1 addition & 1 deletion VidUp.YouTube/HttpWebRequestCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private static async Task<HttpWebRequest> createBasicUploadHttpWebRequest(string
request.Headers.Add(HttpRequestHeader.Authorization, "Bearer " + accessToken);

//raise limits for large uploads
if (length > 5 * 1024 * 1024)
if (length > 100 * 1024 * 1024)
{
request.Timeout = int.MaxValue;
request.AllowWriteStreamBuffering = false;
Expand Down
2 changes: 2 additions & 0 deletions VidUp.YouTube/YoutubeUpload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public static async Task<UploadResult> Upload(Upload upload, long maxUploadInByt
{
//request upload session/uri
HttpWebRequest request = await HttpWebRequestCreator.CreateAuthenticatedUploadHttpWebRequest(YoutubeUpload.uploadEndpoint, "POST", jsonBytes, "application/json; charset=utf-8");
//slug header adds original video file name to youtube studio
request.Headers.Add("Slug", Path.GetFileName(upload.FilePath));
request.Headers.Add("X-Upload-Content-Length", info.Length.ToString());
request.Headers.Add("X-Upload-Content-Type", "video/*");

Expand Down

0 comments on commit 450d202

Please sign in to comment.