PublicShow sourcedownload.pl -- Provide a button for downloading data

This module allows a button to be inserted into the Pengine output that allows for downloading data. Originally this used the data type URL. This has been disabled in recent browsers. Also considering the length limitations on URLs on some browsers we now store the data server-side and make the link simply download the data. The data is kept on the server for keep_downloads_time seconds, default 24 hours.

Source download_button(+Data:string, +Options)
Emit a button in the SWISH output window for downloading Data. The provided data is stored on the server.

Options:

filename(+Name)
(Base-)Name of the file created (default: swish-download.dat),
content_type(+Type)
Full content type. By default this is derived from the extension of the filename and the encoding.
encoding(+Enc)
Encoding to use. One of utf8 or octet. default is utf8.
See also
- https://en.wikipedia.org/wiki/Data_URI_scheme