gitlab-org--gitlab-foss/app/uploaders/favicon_uploader.rb

13 lines
277 B
Ruby

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