diff --git a/web/chat.js b/web/chat.js index 2400af1..462496e 100644 --- a/web/chat.js +++ b/web/chat.js @@ -1,5 +1,7 @@ // All comments are in English. +// TODO: window.location = `/api/file/${file_id}/${original_name}` + let conversationId = null; let conversations = []; @@ -131,7 +133,9 @@ async function loadHistory() { chat.appendChild(div); }); - + + + // Load attachments const a = await fetch(`/api/attachments/${conversationId}`); const attachments = await a.json(); @@ -177,11 +181,11 @@ async function shareConversation() { } function exportMD() { - window.open(`/api/export/md/${conversationId}`, "_blank"); + window.open(`/api/export/md/${conversationId}/conversa.md`, "_blank"); } function exportPDF() { - window.open(`/api/export/pdf/${conversationId}`, "_blank"); + window.open(`/api/export/pdf/${conversationId}/conversa.pdf`, "_blank"); } async function importFile() {