summaryrefslogtreecommitdiff
path: root/app/uploaders/favicon_uploader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/uploaders/favicon_uploader.rb')
-rw-r--r--app/uploaders/favicon_uploader.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/uploaders/favicon_uploader.rb b/app/uploaders/favicon_uploader.rb
index f393fdf0d84..c9be55e001c 100644
--- a/app/uploaders/favicon_uploader.rb
+++ b/app/uploaders/favicon_uploader.rb
@@ -1,16 +1,17 @@
# frozen_string_literal: true
class FaviconUploader < AttachmentUploader
- include UploadTypeCheck::Concern
-
EXTENSION_WHITELIST = %w[png ico].freeze
-
- check_upload_type extensions: EXTENSION_WHITELIST
+ MIME_WHITELIST = %w[image/png image/vnd.microsoft.icon].freeze
def extension_whitelist
EXTENSION_WHITELIST
end
+ def content_type_whitelist
+ MIME_WHITELIST
+ end
+
private
def filename_for_different_format(filename, format)