Canvas Uploading files via POST error 400 "No file uploaded"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2020
07:08 PM
Hello! I have been following the Canvas Uploading Files guide to upload a file using an HTTP POST request, however when I make the multipart/form-data request I receive the 400 error code in the response saying "No file uploaded". I feel like I'm just missing a small detail, but I have made sure to add the file parameter after the upload_params received from the response. I am trying to upload a local file but I am unsure of the syntax. my request is formatted as follows:
name=filename.txt&content_type=text/plain&file=@C:\\Users\\User\\Documents\\filename.txt
Am I doing something wrong? I can add more of my code if needed
Users who also had this question