Hello!
Is it possible to add a a link to download a file directly from a url? I'm doing a basic website with rmarkdown and I tried to use downloadthis but it doesn't seem to work.
This is the chunk
library(downloadthis)
## Link in Github repo
download_link(
link = "https://raw.githubusercontent.com/aescocasti/Charta-Teitok/main/2021-10-07_cosuiza_header_comentado.xml",
button_label = "Download file",
button_type = "danger",
has_icon = TRUE,
icon = "fa fa-save",
self_contained = FALSE
)
I think it is possible but you need to use a download url. In the example, it is github raw content and the url will open the raw file in the browser when it is text, not trigger a download. So clicking on the button will open the raw file in the browser.