Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Uploading a file to Nextcloud from R via webdav
# webdav target and login
dav <- ""
username <- "<username>"
password <- "<password>"
# the file to upload
img <- "image.png"
# create the url target of the file
url <- file.path(dav, img)
# webdav uses a PUT request to send a file to Nextcloud
PUT(url, authenticate(username, password), body = upload_file(file.path(img)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment