Fixed to view files inside the file list

This commit is contained in:
Reinaldo Neto 2021-07-13 16:24:26 -03:00
parent 8a91d0d509
commit 6855dbff7c
1 changed files with 7 additions and 1 deletions

View File

@ -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,