Skip to content

Commit

Permalink
make binary attachments work
Browse files Browse the repository at this point in the history
  • Loading branch information
targoninc-alex committed Jun 30, 2024
1 parent f39ab5b commit d1a43fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/components/pages/chat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,13 @@ export class ChatComponent {
content.attributes("loading", "lazy");
} else if (tag === "video") {
content.attributes("controls", "controls");
} else {
return CommonTemplates.buttonWithIcon("download", attachment.filename, () => {
const link = document.createElement('a');
link.href = url;
link.download = attachment.filename;
link.click();
});
}

return create("div")
Expand Down

0 comments on commit d1a43fb

Please sign in to comment.