Download submisison attachments

Jump to solution
matt_price
Community Explorer

Is it possible to download a submitted file (submission attachment) via the API? I can see that the submission object includes an "attachment" property which contains an object describing the attachment, including a download URL. But it doens't seem to be possible to actually retrieve the file itself. Is there a way to do this? I'm using API v1 on my University's (brand new!) canvas installation.

Thanks!

Labels (1)
0 Likes
1 Solution
pklove
Community Champion

You just need to call the attachments url.  For example:

   https://......../files/1234/download?download_frd=1&verifier=sadfsdfsdfsdfsdfsdf

But note that this will probably re-direct, so your application has to follow the re-direct.  For example, with curl:

   curl -L 'https://......../files/1234/download?download_frd=1&verifier=sadfsdfsdfsdfsdfsdf' > some_file

View solution in original post