Skip to content

Commit 4c945f9

Browse files
authored
fix: storage encoding on copy (#608)
1 parent d6db70e commit 4c945f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/storage/object.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ export class ObjectStorage {
402402
mustBeValidKey(destinationObjectName)
403403

404404
const newVersion = randomUUID()
405-
const s3SourceKey = `${this.db.tenantId}/${this.bucketId}/${sourceObjectName}`
405+
const s3SourceKey = encodeURIComponent(
406+
`${this.db.tenantId}/${this.bucketId}/${sourceObjectName}`
407+
)
406408
const s3DestinationKey = `${this.db.tenantId}/${destinationBucket}/${destinationObjectName}`
407409

408410
await this.db.testPermission((db) => {

0 commit comments

Comments
 (0)