How to get sketch url from azure table

I have a small sketch in azure blob and sketch URL in azure table. I want to get a thumbnail URL. After that, when I click on this URL, it will show the full image from the azure spot. Someone help me. Which query should I use?

+3
source share
1 answer

Part of the URL should be as simple as any other img embedded link if your blob is publicly available.

I don’t know what your object looks like, but let’s just pretend that you have a table called ImageDetails and you have an object called ImageDetail with the ThumbnailURL property. You can query a table with something like this (you probably want to subclass TableServiceContext - this is a simple example):

        var imageDetailQuery = CloudStorageAccount.DevelopmentStorageAccount
            .CreateCloudTableClient()
            .GetDataServiceContext()
            .CreateQuery<ImageDetail>("ImageDetails");
        var imageDetail = (from d in imageDetailQuery where ... select d).FirstOrDefault();

At this point, assuming you have an ImageDetail object, you can simply access:

imageDetail.ThumbnailURL

And create your tag, both inline and code:

var imgTag = String.Format("<img src=\"{0}\"...>", imageDetail.ThumbnailURL);
+4
source

Source: https://habr.com/ru/post/1765499/


All Articles