Organising Azure Media assets in Blob storage

淺唱寂寞╮ 提交于 2019-12-10 14:25:51

问题


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:


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


来源:https://stackoverflow.com/questions/16540457/organising-azure-media-assets-in-blob-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!