6
votes

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?

1
You can find your answer from these solved posts: [Post 1][1] [Post 2][2] [1]: stackoverflow.com/questions/3183857/… [2]: stackoverflow.com/questions/2619007/…Hossein Sarshar
George's answer is correct -- basically, when you create a Media Service, the responsibility for managing the underlying Storage account moves to the Media Service, and you can't control what it does.Rytmis

1 Answers

5
votes

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);