5/27/2019
Posted by 

Join GitHub today

GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.

Sign up New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments

commented Jun 7, 2018

This issue has originally been reported by @cebe at luyadev/luya-module-cms#85.
Moved here by @nadar.

I uploaded a PDF file for download. Linking to that file presents the dowload as Content-Type: application/octet-stream which causes the browser to be unable to show it as PDF and will only save the download. Ideally serving the file with the correct content type would allow directly opening it as PDF.

Given that Type: pdf is already shown in the admin backend I assume the information is already available for serving the correct mime type.

referenced this issue Jun 7, 2018

Closed

File download Content-Type is application/octet-stream #85

Application/octet-stream Filename

referenced this issue Jun 7, 2018

Merged

Fix MIME type and download counter on file download #149

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

I am struggling to open an important pdf file I have on my ubuntu 12.04, which is probably created on MS Windows(assuming since it has some formatting issue). When I open the file using a PDF viewer it show me this error: File type unknown (application/octet-stream) is not supported

I tried to open it using console, too. Here is the output:

Can anybody help me with solving this issue and to fix this?

Thanks Surya

SuryaSurya

1 Answer

MIME type for a PDF on Ubuntu is application/pdf

but application/octet-stream (meaning any generic binary file) is a sort of catch all for files, and usually requires a file extension to determine what to open it with.

Download the PDF locally and save it as a PDF, making sure there is .pdf at the end.

BiggJJBiggJJ

Not the answer you're looking for? Browse other questions tagged 12.04pdf or ask your own question.