rcloud.download.file {rcloud.support} | R Documentation |
rcloud.download.file
invokes a file download in browsers that
support it.
rcloud.download.file(filename, content, mimetype)
filename |
string, name of the file as reported to the browser
or if |
content |
string or raw binary content to put in the file. If
not specified, the file specified by |
mimetype |
optional string, a standard mime type to associate
with the file, e.g. |
rcloud.download.file
sends a payload to the browser and causes
the browser to download it under the specified filename
.
If content
is missing then filename
is interpreted as
a path to a file in the local filesystem whihc will be read as
content and the name of the file is retained for the browser to use.
Not all browsers allow invoking a download programmatically; in particular Safari may open the content in the same window. See https://github.com/eligrey/FileSaver.js/ for a list of compatibility issues.
Gordon Woodhull