Skip to content

Commit 10dff3e

Browse files
authored
fix: do not apply prefix when getting file contents as buffer or stream (#12831)
* fix: do not apply prefix when getting file contents as buffer or stream * Create spotty-mayflies-bathe.md
1 parent 94920c3 commit 10dff3e

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/file-s3": patch
3+
---
4+
5+
fix: do not apply prefix when getting file contents as buffer or stream

packages/modules/providers/file-s3/src/services/s3-file.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export class S3FileService extends AbstractFileProviderService {
247247
)
248248
}
249249

250-
const fileKey = `${this.config_.prefix}${file.fileKey}`
250+
const fileKey = file.fileKey
251251
const response = await this.client_.send(
252252
new GetObjectCommand({
253253
Key: fileKey,
@@ -266,7 +266,7 @@ export class S3FileService extends AbstractFileProviderService {
266266
)
267267
}
268268

269-
const fileKey = `${this.config_.prefix}${file.fileKey}`
269+
const fileKey = file.fileKey
270270
const response = await this.client_.send(
271271
new GetObjectCommand({
272272
Key: fileKey,

0 commit comments

Comments
 (0)