summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
authorBen Bodenmiller <bbodenmiller@hotmail.com>2013-05-15 00:41:33 -0600
committerBen Bodenmiller <bbodenmiller@hotmail.com>2013-05-15 00:41:33 -0600
commitfb4a38f6077a27ea14709641f7fbe1547f37c8d4 (patch)
tree4c2474b16b7d9f09771f03e8c47db5ef98ba96bc /app/uploaders
parentac148c50b07e298ff3f54147bd3faa0485f7e0a1 (diff)
downloadgitlab-ce-fb4a38f6077a27ea14709641f7fbe1547f37c8d4.tar.gz
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
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/attachment_uploader.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb
index 200700b8810..960e71ef640 100644
--- a/app/uploaders/attachment_uploader.rb
+++ b/app/uploaders/attachment_uploader.rb
@@ -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