这是我的组件.html文件
<iframe [src]="frameSrc | safe" class="frameSet" type="application/pdf"
frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen>
This browser does not support PDFs. Please download the PDF to view it:
<a href="frameSrc | safe">Download PDF</a>
</iframe>
当我在浏览器(Chrome)中打开此组件时,pdf被下载而非显示。 frameSrc
来自一个父组件,我将其指定为 [src]
。我想要显示pdf而非下载。我做了一些研究发现在我的浏览器默认情况下,Content-Disposition
是 attachment
。我如何更改这个设置以使其适用于所有浏览器?
http:
改为s
=>https:
。 - zer00ne