Hi @Shaveta Pujani , Thanks for using Microsoft Q&A Platform.
This error message shows that the URL value given is not a valid URL, either relative or absolute. Please check that the URL is properly formatted and that it is a valid URL. Here is the code to which you can compare.
// Upload a video
MultipartFormDataContent content = null;
Console.WriteLine("Uploading...");
content = new MultipartFormDataContent();
FileStream video = File.OpenRead(@"c:\videos\democratic3.mp4");
byte[] buffer = new byte[video.Length];
video.Read(buffer, 0, buffer.Length);
content.Add(new ByteArrayContent(buffer), "MyVideo", "MyVideo");
var queryParams = CreateQueryString(
new Dictionary<string, string>()
{
{"accessToken", accessToken},
{"name", "video sample"},
{"description", "video_description"},
{"privacy", "private"},
{"partition", "partition"},
});
var uploadRequestResult = await client.PostAsync($"{apiUrl}/{accountLocation}/Accounts/{accountId}/Videos?{queryParams}", content);
var uploadResult = await uploadRequestResult.Content.ReadAsStringAsync();
here is the code sample document that demonstrates this: https://learn.microsoft.com/en-us/azure/azure-video-indexer/upload-index-videos?tabs=with-arm-account-account#code-sample
also, GitHub sample code: https://github.com/Azure-Samples/media-services-video-indexer/blob/master/API-Samples/C%23/ArmBased/Program.cs
Regards,
Vasavi