Help needed to display images from azure blob storage


#1

Hello, Could you please help me to display images from http url. ? .

here are the steps that i followed .

  1. white listed image source using $compileProvider in app.config.
    $compileProvider.imgSrcSanitizationWhitelist(/^\s(https|file|blob|cdvfile):|data:image//);

  2. and in controlller I am getting list of item name and image url from web api which is hosted on azure (e.g. http://abc.cloudapp.net

$scope.messages = [
{
“PromoText”: “hello”,
“PromoImgUrl”: “http://xyz.blob.core.windows.net:443/promo--img/ch-img-9defc4ab-d0ce-4c8a-a6fe-71c3790b1ee7.png”,
}
];

  1. here is view source.

                 <h3>{{msg.PromoText}}</h3>
                 <img ng-src="{{msg.PromoImgUrl}}" class="feedImg" />
    

I tried all approaches but no luck to display images in my app.


#2

this issue is resolved now. its not an ionic Fx issue. It is working fine now after changing azure blob uri scheme from http to https** in web api.

Here is the solution. it may help some one who is developing ionic app with asp.net web api + azure.

var uriBuilder = new UriBuilder(blob.Uri);
uriBuilder.Scheme = “https”; // “http”;
var fullPath = uriBuilder.ToString();


#3

did you got any solution for azure blob storage in ionic 3 framework