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
Fix direct upload with a whitelist present that does not contain binary
Oliver Günther0ec9db6e9691
diff --git a/app/services/attachments/prepare_upload_service.rb b/app/services/attachments/prepare_upload_service.rbindex f79f0d9900b..ff9254796ab 100644--- a/app/services/attachments/prepare_upload_service.rb+++ b/app/services/attachments/prepare_upload_service.rb@@ -27,7 +27,7 @@#++module Attachments- class PrepareUploadService < ::BaseServices::Create+ class PrepareUploadService < BaseServicedef persist(call)attachment = call.resultdiff --git a/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb b/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rbindex 516b1308f22..bd80c26f009 100644--- a/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb+++ b/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb@@ -78,8 +78,8 @@ module Bimattachment = Attachment.pending_direct_uploads.where(id: id).firstif attachment.nil? # this should not happenflash[:error] = "Direct upload failed."-redirect_to action: :new+ returnendparams = {@@ -179,7 +179,7 @@ module Bimreturn unless OpenProject::Configuration.direct_uploads?call = ::Attachments::PrepareUploadService- .new(user: current_user)+ .bypass_whitelist(user: current_user).call(filename: "model.ifc", filesize: 0)call.on_failure { flash[:error] = call.message }