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

added s3 comment again

Markus Kahl0170aa96e643
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index dac42bca9b8..f89506a6d34 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -76,6 +76,10 @@ class Attachment < ApplicationRecord
nil
end
+ ##
+ # Do not include the filename in the content disposition as this may break for Unicode file names
+ # specifically when using S3 for attachments. In the case of S3 the file name for the downloaded
+ # file will still be correct as it's part of the URL before the query.
def external_url_options(expires_in: nil)
{ content_disposition: content_disposition(include_filename: false), expires_in: expires_in }
end