| upload_cnt | R Documentation | 
Generic implementing of how to upload files to a connector:
ConnectorFS: Uses fs::file_copy() to copy the file to the file storage.
upload_cnt(
  connector_object,
  file,
  name = basename(file),
  overwrite = zephyr::get_option("overwrite", "connector"),
  ...
)
## S3 method for class 'ConnectorFS'
upload_cnt(
  connector_object,
  file,
  name = basename(file),
  overwrite = zephyr::get_option("overwrite", "connector"),
  ...
)
| connector_object | Connector The connector object to use. | 
| file | character Path to the file to download to or upload from | 
| name | character Name of the content to read, write, or remove. Typically the table name. | 
| overwrite | Overwrite existing content if it exists in the connector?. Default:  | 
| ... | Additional arguments passed to the method for the individual connector. | 
invisible connector_object.
# Upload file to a file storage
writeLines("this is an example", "example.txt")
folder <- withr::local_tempdir()
cnt <- connector_fs(folder)
cnt |>
  list_content_cnt(pattern = "example.txt")
cnt |>
  upload_cnt("example.txt")
cnt |>
  list_content_cnt(pattern = "example.txt")
cnt |>
  remove_cnt("example.txt")
file.remove("example.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.