download_link: Download file from a web address

Description Usage Arguments Value Examples

View source: R/download.R

Description

It associates your download button to a web link. This might be an alternative when your file is too big for being handled by download_this().

Usage

1
2
3
4
5
6
7
8
9
download_link(
  link,
  button_label = "Download data",
  button_type = c("default", "primary", "success", "info", "warning", "danger"),
  has_icon = TRUE,
  icon = "fa fa-save",
  self_contained = FALSE,
  ...
)

Arguments

link

A web address for downloadthing the file.

button_label

Character (HTML), button label

button_type

Character, one of the standard Bootstrap types

has_icon

Specify whether to include fontawesome icons in the button label

icon

Fontawesome tag e.g.: "fa fa-save"

self_contained

A boolean to specify whether your HTML output is self-contained. Default to FALSE.

...

attributes (named arguments) and children (unnamed arguments) of the button, passed to htmltools::tag().

Value

htmltools::tag, <button>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## Link in Github repo
download_link(
link = "https://github.com/fmmattioni/downloadthis/raw/master/inst/example/file_1.pdf",
button_label = "Download pdf file",
button_type = "danger",
has_icon = TRUE,
icon = "fa fa-save",
self_contained = FALSE
)

## End(Not run)

downloadthis documentation built on Sept. 17, 2020, 9:31 a.m.