Skip to content
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

Allow setting file content type based on file content(using libmagic) #949

Closed
wants to merge 1 commit into from

Conversation

snoopie
Copy link

@snoopie snoopie commented Jan 10, 2013

Currently the only way to set content type in carrierwave is using file extension(CarrierWave::MimeTypes).
There is a ruby-filemagic gem which offers ruby bindings to the libmagic library.
This commit adds libmagic-based processor which allows to detect file MIME type based on file content.

@bensie
Copy link
Member

bensie commented Jan 10, 2013

This is a good candidate for an external gem. We're not looking to add any additional processors to core given their dependency on external libraries that are not necessarily available. Looks good though!

@bensie bensie closed this Jan 10, 2013
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.

None yet

2 participants