discourse/lib/file_store
Martin Brennan 0d809197aa
FIX: Make sure S3 object headers are preserved on copy (#14302)
When copying an existing upload stub temporary object
on S3 to its final destination we were not copying across
its additional headers such as content-disposition and
cache-control, which led to issues like attachments not
downloading with their original filename when clicking
the download links in posts.

This is because the metadata_directive = REPLACE option
was not being passed to object.copy_from(), so only the
source object's headers were being used. Added an option
for apply_metadata_to_destination to apply this option
conditionally, because we may not always want to replace
this metadata, but we definitely do when copying a temporary
upload.
2021-09-10 12:59:51 +10:00
..
base_store.rb FIX: Use random file name for temporary uploads (#14250) 2021-09-06 10:21:20 +10:00
local_store.rb FEATURE: Use path from existing URL of uploads and optimized images (#13177) 2021-05-27 17:42:25 +02:00
s3_store.rb FIX: Make sure S3 object headers are preserved on copy (#14302) 2021-09-10 12:59:51 +10:00
to_s3_migration.rb FEATURE: Upload to s3 in parallel to speed up backup restores (#13391) 2021-06-16 10:34:39 +01:00