drive_update | R Documentation |
Update an existing Drive file id with new content ("media" in Drive
API-speak), new metadata, or both. To create a new file or update existing,
depending on whether the Drive file already exists, see drive_put()
.
drive_update(file, media = NULL, ..., verbose = deprecated())
An object of class dribble
, a tibble with one row per file.
Wraps the files.update
endpoint:
This function supports media upload:
# Create a new file, so we can update it
x <- drive_example_remote("chicken.csv") %>%
drive_cp()
# Update the file with new media
x <- x %>%
drive_update(drive_example_local("chicken.txt"))
# Update the file with new metadata.
# Notice here `name` is not an argument of `drive_update()`, we are passing
# this to the API via the `...``
x <- x %>%
drive_update(name = "CHICKENS!")
# Update the file with new media AND new metadata
x <- x %>%
drive_update(
drive_example_local("chicken.txt"),
name = "chicken-poem-again.txt"
)
# Clean up
drive_rm(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.