gitlab-org--gitlab-foss/app/uploaders/favicon_uploader.rb
2018-07-05 00:13:58 -07:00

15 lines
308 B
Ruby

# frozen_string_literal: true
class FaviconUploader < AttachmentUploader
EXTENSION_WHITELIST = %w[png ico].freeze
def extension_whitelist
EXTENSION_WHITELIST
end
private
def filename_for_different_format(filename, format)
filename.chomp(File.extname(filename)) + ".#{format}"
end
end