Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,12 @@ class S3Adapter {
}

const fileKey = `${this._bucketPrefix}${fileName}`;
// For presigned URLs, use the original unencoded filename to prevent double encoding
const presignedFileKey = `${this._bucketPrefix}${filename}`;

let presignedUrl = '';
if (this._presignedUrl) {
const params = { Bucket: this._bucket, Key: fileKey };
const params = { Bucket: this._bucket, Key: presignedFileKey };
const options = this._presignedUrlExpires ? { expiresIn: this._presignedUrlExpires } : {};

const command = new GetObjectCommand(params);
Expand Down