refactor: check if an object has already content disposition header don't copy it again

This commit is contained in:
agp
2026-06-22 11:54:57 +03:30
parent 03416595c0
commit 27a56d15f4
+7
View File
@@ -609,6 +609,13 @@ async function copyWithNewMetadata(client, bucket, key, filename) {
}),
);
if (head.ContentDisposition) {
logger.debug(
newKey,
`object: ${key} has content disposition header: ${head.ContentDisposition}`,
);
}
const result = await client.send(
new CopyObjectCommand({
Bucket: bucket,