AngularJS - Show byte array content as image

后端 未结 4 1120
眼角桃花
眼角桃花 2020-12-03 03:12

I\'m searching into my database a image as a byte array. I want to show this content as file using the markup image, but it doesn\'t work here.

// C         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-03 04:00

    Use ng-src in the following format

    
    

    Don't forget to add a sanitization filter for data to not be marked as unsafe by angular:

    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|file|ftp|blob):|data:image\//);
    

提交回复
热议问题