gitlab-org--gitlab-foss/app/uploaders/uploader_helper.rb
2018-09-04 10:39:08 +00:00

15 lines
331 B
Ruby

# frozen_string_literal: true
# Extra methods for uploader
module UploaderHelper
include Gitlab::FileMarkdownLinkBuilder
private
def extension_match?(extensions)
return false unless file
extension = file.try(:extension) || File.extname(file.path).delete('.')
extensions.include?(extension.downcase)
end
end