Skip to content

Creating a file for download #824

Answered by lovasoa
lozdown asked this question in Q&A
Feb 21, 2025 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

And if you want to avoid the data url and make a standalone download link, you can use shell-empty:

select 'http_header' as component,
    'text/vcard' as "Content-Type",
    'attachment; filename="John Doe.vcf"' as "Content-Disposition";

select 
    'shell-empty' as component,
    'BEGIN:VCARD
VERSION:3.0
FN:John Doe
N:Doe;John
EMAIL:[email protected]
TEL:+1234567890
END:VCARD' as html;

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lozdown
Comment options

You must be logged in to vote
2 replies
@lovasoa
Comment options

@lovasoa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants