Permalink
Browse files

fallback to mime/native content type if browser reports application/o…

…ctet-stream
  • Loading branch information...
1 parent 5ee28e3 commit b91e2e41bcaa84827a756c154ba279a8a03fc639 Ryan Sonnek committed Jan 8, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/technoweenie/attachment_fu.rb
@@ -308,7 +308,7 @@ def uploaded_data=(file_data)
else
self.temp_path = file_data
end
- browser_content_type = nil if browser_content_type.strip.blank? rescue nil
+ browser_content_type = nil if browser_content_type.blank? || browser_content_type.strip.blank? || browser_content_type.strip == default_mime_type
self.content_type = browser_content_type || file_extension_content_type || native_content_type || default_mime_type
end

0 comments on commit b91e2e4

Please sign in to comment.