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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
331 B
Ruby
Raw Normal View History

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