Uploading file works but students cannot access it

michael_tsikerd
Community Novice

I am using the API to upload a file, I am providing the user_id retrieved from canvas when obtaining the assignment submissions from the json response. Then I use that user_id in the following code:

link_url = request_url("%s/assignments/%d/submissions/%d/comments/files" %
(self.base_url, self.configuration.assignment_id, user_id), self.authorization_token,
payload={'name': filename}, method="post")

Then through the assignment comments, I, the instructor can access the file but students get an Access Denied message.

 

What user_id is supposed to be used when uploading? Currently it is a numeric identifier that canvas is providing for each student.

Labels (3)
0 Likes