0

I am having a hard time showing a blob as ngSrc following the PouchDB's Working with attachments Page. My pertinent html is:

<img src="" ng-src="{{$root.images.myImgNameX}}" alt="">

it gets compiled into this:

<img src="http://localhost:8100/fcba0867-bf49-4fe0-b4f2-3490bb65761f" ng-src="blob:http://localhost:8100/fcba0867-bf49-4fe0-b4f2-3490bb65761f" alt="">

But the image is not showed. But if I copy and paste the url in ng-src I can see the image. I get this error:

:8100/#/app/news:1 Refused to load the image 'blob:http://localhost:8100/754f38af-0246-4b33-85c9-049f6d9ce1df' because it violates the following Content Security Policy directive: "img-src 'self' data: *".

How can I use that blob in my img tag?

distante
  • 6,438
  • 6
  • 48
  • 90

1 Answers1

2

I found a solution looking into the error here : Content-Security-Policy object-src blob

I Added img-src 'self' blob: to my <meta http-equiv="Content-Security-Policy"> tag

Community
  • 1
  • 1
distante
  • 6,438
  • 6
  • 48
  • 90