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

make sure not to affect xkt files

Markus Kahl13d71f23735d
diff --git a/modules/bim/lib/open_project/bim/patches/attachment_patch.rb b/modules/bim/lib/open_project/bim/patches/attachment_patch.rb
index d80f7fdb07e..d3d5e5da3a9 100644
--- a/modules/bim/lib/open_project/bim/patches/attachment_patch.rb
+++ b/modules/bim/lib/open_project/bim/patches/attachment_patch.rb
@@ -33,7 +33,7 @@ module OpenProject::Bim::Patches::AttachmentPatch
module InstanceMethods
def external_url_options(expires_in: nil)
- return super unless ifc_model?
+ return super unless ifc_file?
super.merge content_disposition: ifc_content_disposition
end
@@ -44,8 +44,8 @@ module OpenProject::Bim::Patches::AttachmentPatch
ifc_content_disposition
end
- def ifc_model?
- container_type == Bim::IfcModels::IfcModel.name && container.present?
+ def ifc_file?
+ container_type == Bim::IfcModels::IfcModel.name && extension == ".ifc" && container.present?
end
def ifc_content_disposition