Deletion of large files in user profile.

Jump to solution
themidiman
Community Champion

Instructors who have been using Canvas for a long time who haven't necessarily been responsible for optimizing files. Uploaded files such as images and other instructional content that should have been part of a course files storage area seem to stick around long after a course is over. Is there a way to get a report of when a file in one's user space is ready to be deleted? I have an instructor who has blown up their personal storage space by quite a bit and needs a fresh start as they cannot embed any more images in discussion posts. We need a strategy of which files are ready to be deleted by usage. This information will help me to assist where to begin.

Labels (3)
1 Solution
James
Community Champion

@themidiman, there is an API call for that.

GET /api/v1/users/:user_id/files?sort=size&order=desc

You can add ther per_page=100 to that if you like, but it lists the user files with the largest file first.

It appears to include all files under My Files, including the Submissions folder. You may need to grab the folders so you can exclude certain files, but that should help identify where the large files are.

Again, I don't know anything about the trust instance, so it may not give you what you're wanting.

View solution in original post

0 Likes