diff --git a/app/lib/methods/helpers/getFileUrlFromMessage.js b/app/lib/methods/helpers/getFileUrlFromMessage.js index 60995aee1..0eb84c536 100644 --- a/app/lib/methods/helpers/getFileUrlFromMessage.js +++ b/app/lib/methods/helpers/getFileUrlFromMessage.js @@ -6,7 +6,13 @@ export default function(message) { return { audio_url: message.url }; } if (/video/.test(message.type)) { - return { video_url: message.url }; + let video_url = message.url; + const regUfsUpload = /ufs\/.*Uploads/; + if (regUfsUpload.test(video_url)) { + video_url = video_url.replace(regUfsUpload, 'file-upload'); + } + + return { video_url, video_type: message.type }; } return { title_link: message.url,