Skip to content

Commit 059200a

Browse files
properly encode uri when requesting av scan
1 parent 605ffb7 commit 059200a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/events/attachments/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ async function attachmentCreatedKafkaHandler(app, topic, payload) {
6767
throw new Error(result.error);
6868
}
6969
// Construct s3 url
70-
const awsS3Url = `https://${config.get('attachmentsDMZS3Bucket')}.s3.amazonaws.com/${payload.path}`;
70+
const awsS3Url = `https://${config.get('attachmentsDMZS3Bucket')}.s3.amazonaws.com/${encodeURIComponent(payload.path)}`;
7171
const avScanPayload = {
72-
url: encodeURIComponent(awsS3Url),
72+
url: awsS3Url,
7373
fileName: payload.path.split('/').pop(),
7474
moveFile: false,
7575
callbackOption: 'kafka',

0 commit comments

Comments
 (0)