From 0010feed246fa90e7cc0e2c5207bfc9beed539c6 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sun, 9 Jun 2024 06:13:58 -0400 Subject: [PATCH] attempts for file attachments again --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 7cd574f..0300163 100644 --- a/app.js +++ b/app.js @@ -352,13 +352,13 @@ function addFileMessage(from, fileName, fileUrl, fileType, avatar) { if (fileType.startsWith('image/')) { const $image = document.createElement('img'); - $image.src = fileUrl; + $image.src = updatePortInUrl(fileUrl); $image.alt = fileName; $image.classList.add('attached-image'); $content.appendChild($image); } else { const $fileLink = document.createElement('a'); - $fileLink.href = fileUrl; + $fileLink.href = updatePortInUrl(fileUrl); $fileLink.textContent = `File: ${fileName}`; $fileLink.download = fileName; $content.appendChild($fileLink);