Upload a local file to a location on Canvas LMS. Read more about possible parameters at https://canvas.instructure.com/doc/api/file.file_uploads.html.
cnvs_upload(path, endpoint = "/api/v1/courses/:course_id/files", ...)
path | Path to file to upload |
---|---|
endpoint | Character string of the API endpoint for upload. This depends on the required
context of file. For example, the default,
|
... | Other parameters passed along to |
if (FALSE) { ## Upload a course file, ends up in "unfiled" cnvs_upload("notes.pdf", course_id = "1732420") ## Upload a course file to a specific folder cnvs_upload("notes.pdf", course_id = "1732420", parent_folder_path = "cnvs_files") }