Commit fb4a38f6 authored by Ben Bodenmiller's avatar Ben Bodenmiller

fixes #3115 and adds support for gif bmp & tiff images

when showing image preview check via lowercased extension and adds support for gif bmp & tiff images
parent ac148c50
......@@ -8,12 +8,12 @@ class AttachmentUploader < CarrierWave::Uploader::Base
end
def image?
img_ext = %w(png jpg jpeg)
img_ext = %w(png jpg jpeg gif bmp tiff)
if file.respond_to?(:extension)
img_ext.include?(file.extension)
img_ext.include?(file.extension.downcase)
else
# Not all CarrierWave storages respond to :extension
ext = file.path.split('.').last
ext = file.path.split('.').last.downcase
img_ext.include?(ext)
end
rescue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment