summaryrefslogtreecommitdiff
path: root/app/uploaders/avatar_uploader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/uploaders/avatar_uploader.rb')
-rw-r--r--app/uploaders/avatar_uploader.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb
index e4046e4b7e6..73dafaefb41 100644
--- a/app/uploaders/avatar_uploader.rb
+++ b/app/uploaders/avatar_uploader.rb
@@ -5,9 +5,8 @@ class AvatarUploader < GitlabUploader
include RecordsUploads::Concern
include ObjectStorage::Concern
prepend ObjectStorage::Extension::RecordsUploads
- include UploadTypeCheck::Concern
- check_upload_type extensions: AvatarUploader::SAFE_IMAGE_EXT
+ MIME_WHITELIST = %w[image/png image/jpeg image/gif image/bmp image/tiff image/vnd.microsoft.icon].freeze
def exists?
model.avatar.file && model.avatar.file.present?
@@ -29,6 +28,10 @@ class AvatarUploader < GitlabUploader
super || 'avatar'
end
+ def content_type_whitelist
+ MIME_WHITELIST
+ end
+
private
def dynamic_segment