library(stringr)
copy_file_to_temp <- function(f_name) {
folder <- tempdir()
f_dest <- file.path(folder, basename(f_name))
if (file.copy(f_name, f_dest, overwrite = TRUE)) {
f_dest
} else {
stop("Can't copy file to tempdir")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.