aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/object-storage/shared
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/object-storage/shared')
-rw-r--r--server/lib/object-storage/shared/object-storage-helpers.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/lib/object-storage/shared/object-storage-helpers.ts b/server/lib/object-storage/shared/object-storage-helpers.ts
index d13c25798..3046d76bc 100644
--- a/server/lib/object-storage/shared/object-storage-helpers.ts
+++ b/server/lib/object-storage/shared/object-storage-helpers.ts
@@ -110,11 +110,15 @@ function updatePrefixACL (options: {
110function removeObject (objectStorageKey: string, bucketInfo: BucketInfo) { 110function removeObject (objectStorageKey: string, bucketInfo: BucketInfo) {
111 const key = buildKey(objectStorageKey, bucketInfo) 111 const key = buildKey(objectStorageKey, bucketInfo)
112 112
113 logger.debug('Removing file %s in bucket %s', key, bucketInfo.BUCKET_NAME, lTags()) 113 return removeObjectByFullKey(key, bucketInfo)
114}
115
116function removeObjectByFullKey (fullKey: string, bucketInfo: BucketInfo) {
117 logger.debug('Removing file %s in bucket %s', fullKey, bucketInfo.BUCKET_NAME, lTags())
114 118
115 const command = new DeleteObjectCommand({ 119 const command = new DeleteObjectCommand({
116 Bucket: bucketInfo.BUCKET_NAME, 120 Bucket: bucketInfo.BUCKET_NAME,
117 Key: key 121 Key: fullKey
118 }) 122 })
119 123
120 return getClient().send(command) 124 return getClient().send(command)
@@ -195,6 +199,7 @@ export {
195 storeObject, 199 storeObject,
196 200
197 removeObject, 201 removeObject,
202 removeObjectByFullKey,
198 removePrefix, 203 removePrefix,
199 204
200 makeAvailable, 205 makeAvailable,