Skip to content

Add libmagic to better process mime_types on Linux#63

Open
masmullin2000 wants to merge 1 commit intoTheWaWaR:masterfrom
masmullin2000:libmagic
Open

Add libmagic to better process mime_types on Linux#63
masmullin2000 wants to merge 1 commit intoTheWaWaR:masterfrom
masmullin2000:libmagic

Conversation

@masmullin2000
Copy link
Copy Markdown

Problem: serving files as application/application-octext-stream
is annoying if the file is ASCII text

Solution:
When serving files on linux, libmagic can analyze the file
to determine filetype when mime_guess has failed. Use libmagic
to determine if a file is a plaintext file.

Signed-off-by: Michael Mullin masmullin@gmail.com

Problem: serving files as application/application-octext-stream
is annoying if the file is ASCII text

Solution:
When serving files on linux, libmagic can analyze the file
to determine filetype when mime_guess has failed.  Use libmagic
to determine if a file is a plaintext file.

Signed-off-by: Michael Mullin <masmullin@gmail.com>
@TheWaWaR
Copy link
Copy Markdown
Owner

Please fix CI

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants