mirror of
https://github.com/open-webui/open-webui
synced 2025-01-19 17:26:33 +00:00
fix: temp chat json export
This commit is contained in:
parent
6ed8c3cb70
commit
c8be0ee1e0
@ -83,12 +83,19 @@
|
|||||||
|
|
||||||
const downloadJSONExport = async () => {
|
const downloadJSONExport = async () => {
|
||||||
if (chat.id) {
|
if (chat.id) {
|
||||||
chat = await getChatById(localStorage.token, chat.id);
|
let chatObj = null;
|
||||||
|
|
||||||
|
if (chat.id === 'local' || $temporaryChatEnabled) {
|
||||||
|
chatObj = chat;
|
||||||
|
} else {
|
||||||
|
chatObj = await getChatById(localStorage.token, chat.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
let blob = new Blob([JSON.stringify([chatObj])], {
|
||||||
|
type: 'application/json'
|
||||||
|
});
|
||||||
|
saveAs(blob, `chat-export-${Date.now()}.json`);
|
||||||
}
|
}
|
||||||
let blob = new Blob([JSON.stringify([chat])], {
|
|
||||||
type: 'application/json'
|
|
||||||
});
|
|
||||||
saveAs(blob, `chat-export-${Date.now()}.json`);
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user