-
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
Fix #1593 - Magic mime validator #1596
Fix #1593 - Magic mime validator #1596
Conversation
Looks great to me! Thanks! Would you mind also adding an entry to the README for its usage? |
Of course, will do tonight |
@bensie I cannot find a proper section for it in the README. I think it's better to add a wiki page. What do you think? |
@eavgerinos Add a section around https://github.com/carrierwaveuploader/carrierwave#using-minimagick with the other processors. We tend to say the README is considered official docs and wiki is community-driven, so let's get something for it in the README. |
Ok :) Thanks for the instant response! |
@bensie Ready! |
@eavgerinos Looks great! Thanks! |
Fix #1593 - Magic mime validator
Before this, CarrierWave was relying on mime-types or ruby-filemagic gems to get/set the content type of a file in an inconsistent way. After making mime-types a runtime dependency for CW, `CarrierWave::MimeTypes` has been dropped (carrierwaveuploader#1813 for details), and `CarrierWave::MagicMimeTypes` as well. White/blacklisting content types feature (introduced by carrierwaveuploader#1596) was relying only on ruby-filemagic to read the content type of a file. It was optional and required mixing a module to the uploader. This commit removes this dependency by using the already available content type (thanks to `Mime::Types`). This let us drop any dependency on ruby-filemagic in CarrierWave. It makes JRuby support better as ruby-filemagic is unsupported on JRuby due to the C extension.
Before this, CarrierWave was relying on mime-types or ruby-filemagic gems to get/set the content type of a file in an inconsistent way. After making mime-types a runtime dependency for CW, `CarrierWave::MimeTypes` has been dropped (carrierwaveuploader#1813 for details), and `CarrierWave::MagicMimeTypes` as well. White/blacklisting content types feature (introduced by carrierwaveuploader#1596) was relying only on ruby-filemagic to read the content type of a file. It was optional and required mixing a module to the uploader. This commit removes this dependency by using the already available content type (thanks to `Mime::Types`). This let us drop any dependency on ruby-filemagic in CarrierWave. It makes JRuby support better as ruby-filemagic is unsupported on JRuby due to the C extension.
Before this, CarrierWave was relying on mime-types or ruby-filemagic gems to get/set the content type of a file in an inconsistent way. After making mime-types a runtime dependency for CW, `CarrierWave::MimeTypes` has been dropped (carrierwaveuploader#1813 for details), and `CarrierWave::MagicMimeTypes` as well. White/blacklisting content types feature (introduced by carrierwaveuploader#1596) was relying only on ruby-filemagic to read the content type of a file. It was optional and required mixing a module to the uploader. This commit removes this dependency by using the already available content type (thanks to `Mime::Types`). This let us drop any dependency on ruby-filemagic in CarrierWave. It makes JRuby support better as ruby-filemagic is unsupported on JRuby due to the C extension.
Before this, CarrierWave was relying on mime-types or ruby-filemagic gems to get/set the content type of a file in an inconsistent way. After making mime-types a runtime dependency for CW, `CarrierWave::MimeTypes` has been dropped (carrierwaveuploader#1813 for details), and `CarrierWave::MagicMimeTypes` as well. White/blacklisting content types feature (introduced by carrierwaveuploader#1596) was relying only on ruby-filemagic to read the content type of a file. It was optional and required mixing a module to the uploader. This commit removes this dependency by using the already available content type (thanks to `Mime::Types`). This let us drop any dependency on ruby-filemagic in CarrierWave. It makes JRuby support better as ruby-filemagic is unsupported on JRuby due to the C extension.
Before this, CarrierWave was relying on mime-types or ruby-filemagic gems to get/set the content type of a file in an inconsistent way. After making mime-types a runtime dependency for CW, `CarrierWave::MimeTypes` has been dropped (carrierwaveuploader#1813 for details), and `CarrierWave::MagicMimeTypes` as well. White/blacklisting content types feature (introduced by carrierwaveuploader#1596) was relying only on ruby-filemagic to read the content type of a file. It was optional and required mixing a module to the uploader. This commit removes this dependency by using the already available content type (thanks to `Mime::Types`). This let us drop any dependency on ruby-filemagic in CarrierWave. It makes JRuby support better as ruby-filemagic is unsupported on JRuby due to the C extension.
Before this, CarrierWave was relying on mime-types or ruby-filemagic gems to get/set the content type of a file in an inconsistent way. After making mime-types a runtime dependency for CW, `CarrierWave::MimeTypes` has been dropped (carrierwaveuploader#1813 for details), and `CarrierWave::MagicMimeTypes` as well. White/blacklisting content types feature (introduced by carrierwaveuploader#1596) was relying only on ruby-filemagic to read the content type of a file. It was optional and required mixing a module to the uploader. This commit removes this dependency by using the already available content type (thanks to `Mime::Types`). This let us drop any dependency on ruby-filemagic in CarrierWave. It makes JRuby support better as ruby-filemagic is unsupported on JRuby due to the C extension.
Before this, CarrierWave was relying on mime-types or ruby-filemagic gems to get/set the content type of a file in an inconsistent way. After making mime-types a runtime dependency for CW, `CarrierWave::MimeTypes` has been dropped (carrierwaveuploader#1813 for details), and `CarrierWave::MagicMimeTypes` as well. White/blacklisting content types feature (introduced by carrierwaveuploader#1596) was relying only on ruby-filemagic to read the content type of a file. It was optional and required mixing a module to the uploader. This commit removes this dependency by using the already available content type (thanks to `Mime::Types`). This let us drop any dependency on ruby-filemagic in CarrierWave. It makes JRuby support better as ruby-filemagic is unsupported on JRuby due to the C extension.
Fixes #1593