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

add file_link_download api path

Christophe Bliard80d70334959f
diff --git a/modules/storages/lib/open_project/storages/engine.rb b/modules/storages/lib/open_project/storages/engine.rb
index 994a1540019..f96be17300c 100644
--- a/modules/storages/lib/open_project/storages/engine.rb
+++ b/modules/storages/lib/open_project/storages/engine.rb
@@ -91,6 +91,10 @@ module OpenProject::Storages
"#{work_package(work_package_id)}/file_links/#{file_link_id}"
end
+ add_api_path :file_link_download do |work_package_id, file_link_id|
+ "#{work_package(work_package_id)}/file_links/#{file_link_id}/download"
+ end
+
add_api_path :file_link_open do |work_package_id, file_link_id|
"#{work_package(work_package_id)}/file_links/#{file_link_id}/open"
end