Skip to content
Discussion options

You must be logged in to vote

Thank-you @lovasoa ,

Thanks for the guidance, you suggestion worked and the 'data:' ... additions were what I needed to get it all working! (as I had previously tried this approach before exploring the url for the link approach).

Now I can download and display the content in the page now; works brilliantly.

SELECT 'button' as component
WHERE  
    $filename IS NOT NULL AND
    $authorised_to_write = 'true';

SELECT 
    'Download' as title, 
    'download' as icon,
    'green' as color,
    'data:' || doc.magic_type || ';base64,' || encode(doc.content::bytea, 'base64') as link,
    'ledgerflow_doc_' || doc.id::text || '_' || doc.name || '.' || doc.file_extension as download,
    'nofollow…

Replies: 3 comments

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 grodger
Comment options

You must be logged in to vote
0 replies
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