Assignment Submission with Multiple File Uploads via API

CSCI_Teacher
Community Explorer

I'm having trouble figuring out how to upload multiple files as part of a submission via the API. The file upload documentation doesn't seem to address this. I've been able to upload a single file as part of a submission.

According to the documentation, the very first step to uploading a file is to get a token. This is done by issuing an HTTP post to:

/api/v1/courses/:course_id/assignments/:assignment_id/submissions/self/files

As part of that post, you must provide some basic information about your file such as name and size. The first time I issue this post, everything works fine. However, in order to start the process for a second file, I tried to issue another post to the same URL since both files would be associated with the same submission. However, the second post returns a 400 status code.

It seems like I'm only supposed to issue one file upload post for a submission, but the documentation doesn't outline how to include more than one file.

I'm not quite sure how to proceed. Any help would be greatly appreciated!

Labels (3)
0 Likes