Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

wip

Markus Kahl733ea821ae9e
diff --git a/modules/bim/lib/open_project/bim/engine.rb b/modules/bim/lib/open_project/bim/engine.rb
index a1d6f4fd5eb..cd928704c80 100644
--- a/modules/bim/lib/open_project/bim/engine.rb
+++ b/modules/bim/lib/open_project/bim/engine.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
diff --git a/modules/bim/lib/open_project/bim/patches/fog_file_uploader_patch.rb b/modules/bim/lib/open_project/bim/patches/fog_file_uploader_patch.rb
new file mode 100644
index 00000000000..9c4348e932b
--- /dev/null
+++ b/modules/bim/lib/open_project/bim/patches/fog_file_uploader_patch.rb
@@ -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