opf/openproject

View on GitHub
modules/bim/lib/open_project/bim/patches/fog_file_uploader_patch.rb

Summary

Maintainability
A
0 mins
Test Coverage
module OpenProject::Bim::Patches::FogFileUploaderPatch
  def self.included(base) # :nodoc:
    base.prepend InstanceMethods
  end

  module InstanceMethods
    def fog_attributes
      return super unless path.ends_with?(".bcf")

      super.merge({
                    "Content-Type" => "application/octet-stream"
                  })
    end
  end
end