Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Organising Azure Media assets in Blob storage

I'm using Azure Media services to ingest/transcode and deliver content for a web application. The same web application uses Blob storage to store user assets.

As it stands, whenever I ingest a new item into AMS I get a new container created in the blob storage with the asset name. Is there a way to configure AMS to use a sub-container? I'd prefer to keep the media assets organised in their own directory. Instead of just sitting at the top level of my storage account?

like image 461
Ben Ford Avatar asked May 14 '13 10:05

Ben Ford


1 Answers

Azure storage has no phycial hierarchy like folder. There is an option in azure storage api to simulate tree hierarchy by including "/" into your blob names. See related post here

Windows Azure Media Services is not supporting such naming convention at this moment. Once you will try to upload file using .net sdk where physical file name name is not matching IAssetFile.Name you will get exception:

System.ArgumentException: Uploaded file name should be equal (case insensitive) to a IAssetFile.Name property

 IAsset asset = _dataContext.Assets.Create(containerName, AssetCreationOptions.None);
 var file = asset.AssetFiles.Create("Folder/Subfolder" + Guid.NewGuid().ToString());
 file.Upload(_smallWmv);
like image 95
George Trifonov Avatar answered Nov 03 '22 06:11

George Trifonov