Skip to content

Commit

Permalink
encode CopySource prop when copying S3 files
Browse files Browse the repository at this point in the history
  • Loading branch information
hissalht committed Jan 10, 2024
1 parent 28b5daa commit 953cabf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions confiture-rest-api/src/audits/file-storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export class FileStorageService {
(d) =>
new CopyObjectCommand({
Bucket: this.config.get<string>("S3_BUCKET"),
CopySource: `/${this.config.get<string>("S3_BUCKET")}/${
d.originalKey
}`,
CopySource: encodeURIComponent(
`/${this.config.get<string>("S3_BUCKET")}/${d.originalKey}`
),
Key: d.destinationKey,
ACL: "public-read"
})
Expand Down

0 comments on commit 953cabf

Please sign in to comment.