vn-verdnaturachat/app/lib/utils.js

4 lines
214 B
JavaScript
Raw Normal View History

export const formatAttachmentUrl = (attachmentUrl, userId, token, server) => (
encodeURI(attachmentUrl.includes('http') ? attachmentUrl : `${ server }${ attachmentUrl }?rc_uid=${ userId }&rc_token=${ token }`)
);