Skip to content

Commit

Permalink
Extract clipId from upload tikect.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfilippov committed May 21, 2023
1 parent 22d9bec commit ee20fe6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/VimeoDotNet.Tests/UploadTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public async Task ShouldCorrectlyUploadFileByPath()
file.ContentType.ShouldBe("video/mp4");
length = file.Data.Length;
completedRequest = await AuthenticatedClient.UploadEntireFileAsync(file, chunkSize);
completedRequest.ClipId.ShouldNotBeNull();
completedRequest.ClipId.ShouldBe(815922745);
}

completedRequest.ShouldNotBeNull();
Expand Down Expand Up @@ -327,7 +327,7 @@ public async Task ShouldCorrectlyUploadFileByByteArray()
length = file.Data.Length;
var client = CreateAuthenticatedClient();
completedRequest = await client.UploadEntireFileAsync(file, chunkSize);
completedRequest.ClipId.ShouldNotBeNull();
completedRequest.ClipId.ShouldBe(815922745);
}

completedRequest.ShouldNotBeNull();
Expand Down
2 changes: 1 addition & 1 deletion src/VimeoDotNet/Net/UploadRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public IBinaryContent File
public long FileLength { get; private set; }

/// <inheritdoc />
public long? ClipId => ModelHelpers.ParseModelUriId(ClipUri);
public long? ClipId { get; set; }

#endregion
}
Expand Down
1 change: 1 addition & 0 deletions src/VimeoDotNet/VimeoClient_Upload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ private async Task<IUploadRequest> StartUploadFileAsync(IBinaryContent fileConte

var uploadRequest = new UploadRequest
{
ClipId = ticket.Id,
ClipUri = ticket.Link,
Ticket = ticket,
File = fileContent,
Expand Down

0 comments on commit ee20fe6

Please sign in to comment.