carrierwave
https://github.com/jnicklas/carrierwave
Ruby
Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
CarrierWave::Uploader::MagicMimeBlacklist#extract_content_type
Extracts the content type of the given file === Returns [String] the extracted content type
Edit
git clone [email protected]:jnicklas/carrierwave.git
cd carrierwave
open lib/carrierwave/uploader/magic_mime_blacklist.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-CarrierWave--Uploader--MagicMimeBlacklist-extract_content_type-for-pr
# Commit to gitgit add lib/carrierwave/uploader/magic_mime_blacklist.rbgit commit -m "better docs for CarrierWave::Uploader::MagicMimeBlacklist#extract_content_type"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-CarrierWave--Uploader--MagicMimeBlacklist-extract_content_type-for-pr
hub pull-request
# Celebrate!