From 04c7d31f12e8acb46474a24aabe7b077799ad8f2 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 6 Mar 2021 19:09:54 +0100 Subject: [PATCH] Improve file size --- assets/js/components/conversations/chatWindows.js | 2 +- assets/js/pages/conversations/conversation.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/components/conversations/chatWindows.js b/assets/js/components/conversations/chatWindows.js index 6bf53b57..c6694096 100644 --- a/assets/js/components/conversations/chatWindows.js +++ b/assets/js/components/conversations/chatWindows.js @@ -1066,7 +1066,7 @@ const ConvChatWindow = { appendTo: messageTargetElem, type: "a", href: messageFile.url, - innerHTML: " "+ messageFile.name + " (" + messageFile.size/1024 + "MB)", + innerHTML: " "+ messageFile.name + " ("+fileSizeToHuman(messageFile.size)+")", }) letFileLink.target = "_blank" } diff --git a/assets/js/pages/conversations/conversation.js b/assets/js/pages/conversations/conversation.js index bb7f640c..c568e89c 100644 --- a/assets/js/pages/conversations/conversation.js +++ b/assets/js/pages/conversations/conversation.js @@ -343,7 +343,7 @@ const ConversationPageConvPart = { appendTo: messageContentContainer, type: "a", href: messageFile.url, - innerHTML: " "+ messageFile.name + " (" + messageFile.size/1024 + "MB)", + innerHTML: " "+ messageFile.name + " ("+fileSizeToHuman(messageFile.size) +")", }) letFileLink.target = "_blank" }