refactor: check if an object has already content disposition header don't copy it again
This commit is contained in:
@@ -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(
|
const result = await client.send(
|
||||||
new CopyObjectCommand({
|
new CopyObjectCommand({
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
|
|||||||
Reference in New Issue
Block a user