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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
do not delete tmp file if storage is local because it has yet to be copied
Markus Kahlf9c32e4a057e
diff --git a/modules/bim/app/contracts/bim/ifc_models/base_contract.rb b/modules/bim/app/contracts/bim/ifc_models/base_contract.rbindex 94cab76ac48..06dcecc8af2 100644--- a/modules/bim/app/contracts/bim/ifc_models/base_contract.rb+++ b/modules/bim/app/contracts/bim/ifc_models/base_contract.rb@@ -77,10 +77,19 @@ module Bimrescue ArgumentErrorerrors.add :base, :invalid_ifc_fileensure- FileUtils.rm file_path if File.exists? file_path+ clean_up file_pathendend+ def clean_up(file_path)+ # If we are using direct uploads we can safely discard the file here straight away+ # after we checked its contents. The actual file has already been uploaded to its final (remote) destination.+ # For local uploads the file must remain to be copied later to its final (local) destination from the cache.+ return unless OpenProject::Configuration.direct_uploads?++ FileUtils.rm file_path if File.exists? file_path+ end+def uploader_is_ifc_attachment_authorerrors.add :uploader_id, :invalid if model.ifc_attachment && model.uploader != model.ifc_attachment.authorend