Merge pull request #8751 from opf/fix/bcf-export-file-extension

Fix/bcf export file extension
pull/8775/head
Markus Kahl 4 years ago committed by GitHub
commit 129e6385fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/bim/lib/open_project/bim/engine.rb
  2. 15
      modules/bim/lib/open_project/bim/patches/fog_file_uploader_patch.rb

@ -95,7 +95,7 @@ module OpenProject::Bim
assets %w(bim/logo_openproject_bim_big.png)
patches %i[WorkPackage Type Journal RootSeeder Project]
patches %i[WorkPackage Type Journal RootSeeder Project FogFileUploader]
patch_with_namespace :OpenProject, :CustomStyles, :ColorThemes
patch_with_namespace :API, :V3, :Activities, :ActivityRepresenter

@ -0,0 +1,15 @@
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")
{
"Content-Type" => "application/octet-stream"
}
end
end
end
Loading…
Cancel
Save