Closed lu-maca closed 11 months ago
Hi,
currently the answer is no, filename is fixed to be embed caption and extension is appended by mime_type
of embed. We can add the following support for this:
formatter.embed(..., caption="Something zipped", filename="something.zip")
- we probably need to add support for binary files as well, if not done yet (I do not remember)formatter.embed(..., caption="something.zip")
Thanks for raising this!
This looks good to me!
Hi guys,
is it possible to choose the extension of the file downloadable by "Download" button in embed data? I'm quite sure the answer is: no, at the moment.
One solution should be to add a check to the filename. If the pattern ".something" is present in the filename, do nothing; if not, append .txt to it.
A basic implementation: in
function download_embed(id, filename)
:This shall also be done for other branches, but I'm not sure if this works for non text files. Also, I'm not sure if this is the best workaround for this problem.
Thanks Luca