URL where the image is stored. This URL should directly return the image and it should not be redirected to somewhere else.
C# Sample
using System;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
class Program
{
static void Main(string[] args)
{
string videoId = "your_video_id";
string bearerToken = "your_bearer_token";
string filePath = "path/to/image.png";
string url = $"https://upload.dyntube.com/v1/videos/image/{videoId}";
using (var httpClient = new HttpClient())
using (var fileStream = new FileStream(filePath, FileMode.Open))
using (var form = new MultipartFormDataContent())
{
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", bearerToken);
form.Add(new StreamContent(fileStream), "file", "image.png");
var response = httpClient.PutAsync(url, form).Result;
if (response.IsSuccessStatusCode)
{
Console.WriteLine("Video image updated successfully.");
}
else
{
Console.WriteLine($"Error updating video image. Status code: {response.StatusCode}");
}
}
}
}