Reputation: 199
I'm very new with Azure and Azure Media Services, so I've a lot of questions about media upload, store and managements. This is the scenario:
I'm creating an API with Asp.Net Core that allow the users to upload Video, Audio and Images. So the user can see the list of videos, images and audio uploaded with a thumbnail. For now I'm just working on Video Uploading. When a video is uploaded, I create a thumbnail that's stored into a Container associate with an Assets ( using a custom TransformOutput ). I'm following the official documentation: https://learn.microsoft.com/it-it/azure/media-services/latest/stream-files-tutorial-with-api .
So, everytime an user upload a video, an Assets and a Container is created. Into container there is the thumbnail and the container is private, so you can not access to the files without an SAS Key. And there is where I've some doubts:
Server side I've to create a List with thumbnails, every thumbnail is stored in a private container with the video file, meta etc etc. but I can't swith the entire container to public because I don't want to allow the direct access to the videos, but just to the thumbnails.
Maybe the best solution is to separate the thumbnails into another Public Container?
My original idea was to create, for every user, 4 Containers:
So when an user upload a video, I can store the video into User_X_VideoContainer and Thumbnail into User_X_ThumnailsContainer and use different level of access to the single Container. But I don't know if this is a good practice because Azure Media Services create first an Assets and so a Container with everything inside. So witch is the best way to store and manage user files that had different type of level access?
Thanks!
Upvotes: 0
Views: 264
Reputation: 266
I would recommend to store the public data in another storage account for better security (and use Azure CDN to cache the content). This storage account could be attached to your AMS account so you can specify this storage account as a destination for the thumbnail output in the job, based on the AMS transform. Thumbnail output documentation.
Upvotes: 1