sp_upload | R Documentation |
sp_upload()
and sp_download()
wrap the $upload_file()
and $download_file()
methods from the Microsoft365R::ms_drive object. In addition, sp_upload()
checks for the
existence of the destination folder and will prompt the user to create it if
it doesn't exist.
sp_upload(src, dest = basename(src), site = NULL, drive = NULL)
sp_download(
src,
dest = basename(src),
site = NULL,
drive = NULL,
overwrite = FALSE
)
src |
Location of source file. Either a local path (for |
dest |
Location of destination file. If not provided, uses the same file name as |
site |
Site identifier. Can be the site name, id, URL, or an ms_site object. If no site identifier is provided, uses the stored default site if it exists. |
drive |
Drive identifier. Can be the drive name, id, or an ms_drive object. If site is provided but drive is not, uses the first drive of the provided site. If neither is provided, uses the stored default drive if it exists. |
overwrite |
Should the destination file be overwritten if it exists? |
Returns dest
invisibly
sp_read()
, sp_write()
; $upload_file()
and $download_file()
from Microsoft365R::ms_drive
# Set site defaults
sp_defaults("Data Analytics")
# List files
sp_list()
# Download a document locally
sp_download("Analysis Tools.docx", "AT.docx")
# Upload a document
sp_upload("AT.docx", "Analysis Tools.docx")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.