debian-mirror-gitlab/app/uploaders/uploader_helper.rb
2018-11-20 20:47:30 +05:30

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