hummingbird-me/hummingbird — pull request #308 by vevix (2014-11-18 20:10:44+00:00)
Title: Wiki 5

##### What's Changed?

* Direct staff edits now create a history record too
* Bug fix for paperclip issue **!**

Ryn let me know of a bug where some users cover images, and poster images weren't uploading, even tho they were legit images.

This was because paperclips `UriAdapter` uses the response header to determine the content type, rather than their `ContentTypeDetector` class.

```ruby
# Before
@target = "http://i3.minus.com/ibxYBmHKFAehQb.jpg"
Paperclip::UriAdapter.new(URI(@target)).content_type
# => "application/octet-stream"

# After
@target = "http://i3.minus.com/ibxYBmHKFAehQb.jpg"
Paperclip::UriAdapter.new(URI(@target)).content_type
Command :: file -b --mime '/var/folders/ss/r13h6j354qvft40_j0lsyk3h0000gn/T/open-uri20141119-29825-1urb3jo'
# => "image/jpeg"
```