knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of {transfersh} is to utilize the power of transfer.sh through R. \code{transfer.sh} is a website and not a script, which helps users to share files from the command-line an efficient way. It won’t required any additional software to work except pre-installed application such as curl.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("kvasilopoulos/transfer")
This is a basic example which shows you how to use {transfersh}:
library(transfersh)
To upload a file you can easily use the name of the file and the path where the file is located, if it is not in the working directory. In case of a folder or multiple files tf_upload
will bundle all contents and zip it into a single file. Then it will upload the zip and delete the zip that was created locally.
tf_upload("file.txt", path = "inst/examples")
tf_upload("folder", path = "inst/examples")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.