-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UploadThumbnailAsync not working? #130
Comments
Hi, Anyone can help? |
Update: I was encoding "active" and "time" in the url, instead they should be put in the body. public async Task SetThumbnailAsync(long clipId, float time)
{
try
{
ThrowIfUnauthorized();
var request = _apiRequestFactory.GetApiRequest(AccessToken);
request.Method = HttpMethod.Post;
request.Path = Endpoints.Pictures;
request.UrlSegments.Add("clipId", clipId.ToString());
var parameters = new Dictionary<string, string>
{
["active"] = "true",
["time"] = time.ToString()
};
request.Body = new FormUrlEncodedContent(parameters);
var response = await request.ExecuteRequestAsync().ConfigureAwait(false);
CheckStatusCodeError(null, response, "Error Setting thumbnail image.");
}
catch (Exception ex)
{
if (ex is VimeoApiException)
{
throw;
}
throw new VimeoUploadException("Error Setting thumbnail image.", null, ex);
}
} |
Hi,
I've been having difficulties uploading a custom thumbnail to vimeo. Every attempt results in images like this: https://i.vimeocdn.com/video/786876502_480.jpg
I don't see anything wrong with the code but perhaps I am doing something wrong.
Or perhaps Vimeo has changed something.
Please assist.
Using file = New VimeoDotNet.Net.BinaryContent(FileUpload1.FileContent, "image/jpeg") Dim uploaded = Await Client.UploadThumbnailAsync(Record.VimeoClipID, file) End Using
The text was updated successfully, but these errors were encountered: