[ARCHIVED] 500 Internal Server Error when POSTing to submissions endpoint for uploading a file

Jump to solution
tneotia
Community Member

Hello all,

I'm trying to use the Canvas API to upload files for a student submission, but I keep getting a 500 error on the first step to upload the file (the submissions "upload file" endpoint). I don't think I'm doing anything wrong in the request, here's a screenshot of the Live API page: 

tneotia_0-1602508763731.png

and the headers:

tneotia_1-1602508785421.png

Does anyone know why this is occurring? For reference I get this same issue when trying to upload for submission comments (again, a specific endpoint), but uploading to any folder works just fine.

Labels (2)
0 Likes
1 Solution
tneotia
Community Member
Author

I figured this out... turns out the live API doesn't include all the parameters necessary to upload a file. You need to add the filename when sending your request as a query parameter otherwise it will give you the 500 error.

View solution in original post

0 Likes