Angular 将url blob响应转换为图像
我想在我的应用程序中显示保存为图像的文档,这些文件可能是“pdf、.doc、.png”。等等,我从请求中收到的url是这样的:“urlFile:”https://paprodactdatosfiles.blob.core.windows.net/…4T16%…“我想在应用程序中将其显示为图像Angular 将url blob响应转换为图像,angular,image,blob,Angular,Image,Blob,我想在我的应用程序中显示保存为图像的文档,这些文件可能是“pdf、.doc、.png”。等等,我从请求中收到的url是这样的:“urlFile:”https://paprodactdatosfiles.blob.core.windows.net/…4T16%…“我想在应用程序中将其显示为图像 in my .ts file I got this.CedulaUrl = this.cedulaFile[0].urlFile in my .html <div class="i
in my .ts file I got
this.CedulaUrl = this.cedulaFile[0].urlFile
in my .html
<div class="image-container">
<img [src]="CedulaUrl" alt="" width="300px" />
</div>
在我得到的.ts文件中
this.CedulaUrl=this.cedulaFile[0].urlFile
在my.html中
如果文件不是png或jpeg扩展名,如何实现这一点