diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 8f38ad1d8..9fff020f1 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -376,7 +376,7 @@ export default { const filesToUpload = hasFiles ? files.map((file) => ({ - upload: file.blob, + upload: new File([file.blob], `${file.name}.${file.extension}`), name: file.name, type: file.type, })) @@ -494,7 +494,7 @@ export default { const objectURL = window.URL.createObjectURL(blob) const downloadLink = document.createElement('a') downloadLink.href = objectURL - downloadLink.download = `${file.name}.${file.type.split('/')[1]}` + downloadLink.download = `${file.name}.${file.url.split('.').slice(-1).pop()}` downloadLink.style.display = 'none' document.body.appendChild(downloadLink) downloadLink.click()