diff --git a/app/lib/utils.js b/app/lib/utils.js index 8f14bd4c5..56e8a0a6c 100644 --- a/app/lib/utils.js +++ b/app/lib/utils.js @@ -1,3 +1,3 @@ export const formatAttachmentUrl = (attachmentUrl, userId, token, server) => ( - encodeURI(attachmentUrl.includes('http') ? attachmentUrl : `${ server }${ attachmentUrl }?rc_uid=${ userId }&rc_token=${ token }`) + encodeURI(attachmentUrl.startsWith('http') ? attachmentUrl : `${ server }${ attachmentUrl }?rc_uid=${ userId }&rc_token=${ token }`) );