@ccci/micro-server 1.0.201 → 1.0.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -303606,8 +303606,11 @@ class UploaderS3 {
|
|
|
303606
303606
|
}
|
|
303607
303607
|
static async deleteFile(bucketName, key) {
|
|
303608
303608
|
try {
|
|
303609
|
-
const
|
|
303610
|
-
|
|
303609
|
+
const headCommand = new import_client_s3.HeadObjectCommand({ Bucket: bucketName, Key: key });
|
|
303610
|
+
const { VersionId } = await UploaderS3.client.send(headCommand);
|
|
303611
|
+
const data = await UploaderS3.client.send(new import_client_s3.DeleteObjectCommand({ Bucket: bucketName, Key: key, VersionId }));
|
|
303612
|
+
Logger.info(`deleted key : ${key} `);
|
|
303613
|
+
Logger.info(`data : ${JSON.stringify(data)} `);
|
|
303611
303614
|
} catch (error) {
|
|
303612
303615
|
Logger.error(error);
|
|
303613
303616
|
throw error;
|