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

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


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.


try to use those examples in your code.

PDFobject

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

<iframe src="./xyz123/PdfFile.pdf"  title="title">   <a href="./xyz123/PdfFile.pdf"> ... </a></iframe>


Similar issue came up for me only for .pdf files. I changed the Application Pool's idenity to Network Service and it fixed the issue.

I am not sure why it worked as the response header still had the same Content-Type, but it worked.