View source: R/updateRendered.r
setDownloadHandler | R Documentation |
Shiny events version of downloadHandler
setDownloadHandler(id, filename, content, contentType = NA, ..., app = getApp())
id |
name of the downloadButton or downloadLink |
filename |
A string of the filename, including extension, that the user's web browser should default to when downloading the file; or a function that returns such a string. |
content |
A function that takes a single argument file that is a file path (string) of a nonexistent temp file, and writes the content to that file path. |
contentType |
A string of the download's content type, for example "text/csv" or "image/png". If NULL or NA, the content type will be guessed based on the filename extension, or application/octet-stream if the extension is unknown. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.