From 71caf7521d217babdcd2b87c2d9275d07de2d17c Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 10 Sep 2018 10:49:01 +0800 Subject: [PATCH] Drop `tif`, `tiff`, `webp` and `bmp` from supported images. https://meta.discourse.org/t/cr2-raw-files-are-being-treated-as-tiff-files/96775/3?u=tgxworld --- lib/file_helper.rb | 2 +- spec/fixtures/images/webp_as.bin | Bin 0 -> 26 bytes spec/lib/upload_creator_spec.rb | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 spec/fixtures/images/webp_as.bin diff --git a/lib/file_helper.rb b/lib/file_helper.rb index 331b2636d8f..f7d2a0907d8 100644 --- a/lib/file_helper.rb +++ b/lib/file_helper.rb @@ -101,7 +101,7 @@ class FileHelper end def self.supported_images - @@supported_images ||= Set.new %w{jpg jpeg png gif tif tiff bmp svg webp ico} + @@supported_images ||= Set.new %w{jpg jpeg png gif svg ico} end def self.supported_images_regexp diff --git a/spec/fixtures/images/webp_as.bin b/spec/fixtures/images/webp_as.bin new file mode 100644 index 0000000000000000000000000000000000000000..2f8bf8fa1abcc8705d39a5815d7b0aad344c613f GIT binary patch literal 26 fcmWIYbaNA8U|