We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3548685 + cfd4421 commit 0e3e74eCopy full SHA for 0e3e74e
server/shared/storage/providers/amazon.js
@@ -98,6 +98,7 @@ class Amazon {
98
// API docs: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#deleteObjects-property
99
deleteFiles(keys, options = {}) {
100
const objects = keys.map(key => ({ Key: key }));
101
+ if (!keys.length) return Promise.resolve();
102
const params = Object.assign(options, { Bucket: this.bucket, Delete: { Objects: objects } });
103
return this.client.deleteObjects(params).promise();
104
}
0 commit comments