resource interpreted as document but transferred w

2019-06-17 05:34发布

Don't know why I'm facing this issue not able to download pdf files in chrome browser, it is showing below error in Nginx server.

resource interpreted as document but transferred with mime type application/octet-stream pdf

Though I have included mime type as application/pdf

2条回答
混吃等死
2楼-- · 2019-06-17 06:21

try to use those examples in your code.

PDFobject

this is a classic one: if you can load localhost:8080/xyz123/PdfFile.pdf then write like this:

<iframe src="./xyz123/PdfFile.pdf"  title="title">
   <a href="./xyz123/PdfFile.pdf"> ... </a>
</iframe>
查看更多
地球回转人心会变
3楼-- · 2019-06-17 06:22

If it's just a warning then simply ignore it! It's just Chrome.

If not, try to include MIME Type as application/octet-stream.

查看更多
登录 后发表回答