-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add CarrierWave::MagicMimeTypes #1584
Conversation
This module extracts the file content-type using ruby-filemagic gem for more accurate results
In order to fix the travis errors I think we need something like
in the |
Haha I changed the branch yesterday for the same reason, I couldn't push :) |
It's ok :) Though you could have asked me to perform the changes you wished :) |
@eavgerinos You have to request that Travis whitelist apt packages before they can be used. :( |
@bensie meh :S Then let's send them a request :) Will you do it please (since you own the project)? |
Done: travis-ci/travis-ci#3331 |
Perfect! |
@eavgerinos ruby-filemagic appears unsupported on JRuby :( |
@bensie Well this is true since it has native extension in C, we can exclude it if |
I'll gladly take a patch, especially since this is an optional processor. Thanks! |
@eavgerinos If you want, you pull this branch locally, push to your fork, and reopen the PR. Or you can open a separate PR that targets this branch. Up to you. |
@bensie ok :) I'll open a PR directly to this branch, so it can be reviewed as a whole before it reach the master branch |
…type Add CarrierWave::MagicMimeTypes
Since carrierwaveuploader#1245 (*), CarrierWave::MimeTypes module is redundant as `mime-types` gem is a runtime dependency now, and `SanitizedFile` gets it's content_type using it. The module was deprecated since 0.10 and warned developers when used it. (*) I discovered this when tried to fix specs marked as pending. I looked at commits history and PRs to understand what happened. It started with carrierwaveuploader#372 that added `CarrierWave::MimeTypes` processor (Jun 2011), then carrierwaveuploader#1216 and carrierwaveuploader#1245 that made `mime-types` a runtime dependency and deprecated `CarrierWave::MimeTypes` module (2013), and finally carrierwaveuploader#1584 `CarrierWave::MagicMimeTypes` (2015)
Since carrierwaveuploader#1245 (*), CarrierWave::MimeTypes module is redundant as `mime-types` gem is a runtime dependency now, and `SanitizedFile` gets it's content_type using it. The module was deprecated since 0.10 and warned developers when used it. (*) I discovered this when tried to fix specs marked as pending. I looked at commits history and PRs to understand what happened. It started with carrierwaveuploader#372 that added `CarrierWave::MimeTypes` processor (Jun 2011), then carrierwaveuploader#1216 and carrierwaveuploader#1245 that made `mime-types` a runtime dependency and deprecated `CarrierWave::MimeTypes` module (2013), and finally carrierwaveuploader#1584 `CarrierWave::MagicMimeTypes` (2015)
Since carrierwaveuploader#1245 (*), CarrierWave::MimeTypes module is redundant as `mime-types` gem is a runtime dependency now, and `SanitizedFile` gets it's content_type using it. The module was deprecated since 0.10 and warned developers when used it. (*) I discovered this when tried to fix specs marked as pending. I looked at commits history and PRs to understand what happened. It started with carrierwaveuploader#372 that added `CarrierWave::MimeTypes` processor (Jun 2011), then carrierwaveuploader#1216 and carrierwaveuploader#1245 that made `mime-types` a runtime dependency and deprecated `CarrierWave::MimeTypes` module (2013), and finally carrierwaveuploader#1584 `CarrierWave::MagicMimeTypes` (2015)
can someone help please update wiki pages about this? This old module is still recommended as how to set content type in 2 pages |
@naaano Please open a new issue so we can track this properly and decide the best way to fix this problematic situation. |
Replacing #1559 with master merged and a few changes.