500 Internal Server Error when POSTing to submissions endpoint for uploading a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
and the headers:
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.