mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: migrate_to_s3
task not setting the right content_disposition.
This commit is contained in:
parent
70b56c8332
commit
99cd3ff6ee
@ -315,7 +315,12 @@ def migrate_to_s3
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !FileHelper.is_supported_image?(name)
|
if !FileHelper.is_supported_image?(name)
|
||||||
options[:content_disposition] = %Q{attachment; filename="#{name}"}
|
upload = Upload.find_by(url: "/#{file}")
|
||||||
|
|
||||||
|
if upload&.original_filename
|
||||||
|
options[:content_disposition] =
|
||||||
|
%Q{attachment; filename="#{upload.original_filename}"}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if dry_run
|
if dry_run
|
||||||
|
Loading…
Reference in New Issue
Block a user