[ARCHIVED] Download File; use API?

Jump to solution
corellie
Community Explorer

Newbie to group

How do I download a file using the API?

The file is a *.docx.
I see GET /api/v1/courses/:course_id/files/:id
That will give me the URL:  https:.../files/id/download?download_frd=1&verifier=XXXX
but it wants to open in my browser, and then it wants me to OPEN in WORD.

I just want to save it (to my desktop or directory).

Thanks

Labels (2)
1 Solution
corellie
Community Explorer
Author

This worked:  download.file(URL, outfilename, mode='wb')

I tested it with downloading both a *.pdf and *.docx.

Thanks all.

View solution in original post