diff --git a/lib/upload_recovery.rb b/lib/upload_recovery.rb index 176ba6ca142..d9044c33b77 100644 --- a/lib/upload_recovery.rb +++ b/lib/upload_recovery.rb @@ -89,9 +89,12 @@ class UploadRecovery tombstone_prefix = FileStore::S3Store::TOMBSTONE_PREFIX if key.starts_with?(tombstone_prefix) + old_key = key + key = key.sub(tombstone_prefix, "") + Discourse.store.s3_helper.copy( + old_key, key, - key.sub(tombstone_prefix, ""), options: { acl: "public-read" } ) end