So far all the samples on azure regarding azure media services, expect that files in general must be stored locally in order to upload to azure media services.
The reason being is that the CreateFromFile()
has two parameters: string filePath and options.
Example:
static public IAsset UploadFile(string fileName, AssetCreationOptions options)
{
IAsset inputAsset = _context.Assets.CreateFromFile(
fileName,
options,
(af, p) =>
{
Console.WriteLine("Uploading '{0}' - Progress: {1:0.##}%", af.Name, p.Progress);
});
Console.WriteLine("Asset {0} created.", inputAsset.Id);
return inputAsset;
}
Now what if the video has been passed in the body of a post API? How would one try to approach such a challenge?