Skip to content

Delete unused files#1117

Open
Ishfaq-code wants to merge 40 commits intoucfopen:devfrom
Ishfaq-code:delete-unused-files
Open

Delete unused files#1117
Ishfaq-code wants to merge 40 commits intoucfopen:devfrom
Ishfaq-code:delete-unused-files

Conversation

@Ishfaq-code
Copy link
Copy Markdown
Contributor

@Ishfaq-code Ishfaq-code commented Feb 24, 2026

Summary

Adds a button to the Review Files page that allows for files to be deleted in bulk. Users are able to select all files or individually select files to delete

The deletion is done by batch and takes in a payload of files to be deleted once at a time. This is done to avoid hitting the limit on the canvas API. By default 10 files can be deleted at a time. This means if there are 22 unused files in a course, 10 files go get deleted, then the next 10 and then finally the last 2

Testing

  1. Upload files onto canvas but don't use them on pages. This can be done by using the files tab on a canvas course
  2. Go onto UDOIT Review File Tab
  3. Click the Delete Unused Files button on the top right
  4. Option to delete should open up
  5. User can toggle to select all or select 1 by 1
  6. Click the delete button on the bottom right
  7. After all files are deleted the modal should update on show that
  8. The delete button should be disabled when the files are in the middle of being deleted

Feedback

Functionally the implementation was working so I am looking mostly for UI/flow feedback. This is a significant feature that maybe used a lot and making the flow simple, easy to understand and clean is important.

@Ishfaq-code Ishfaq-code marked this pull request as draft February 24, 2026 22:17
@Ishfaq-code Ishfaq-code marked this pull request as ready for review February 25, 2026 21:57
@Ishfaq-code Ishfaq-code requested review from dmols and mbusch3 February 25, 2026 21:57
@Ishfaq-code Ishfaq-code self-assigned this Feb 25, 2026
@Ishfaq-code Ishfaq-code marked this pull request as draft March 3, 2026 15:46
@Ishfaq-code Ishfaq-code marked this pull request as ready for review March 9, 2026 18:47
@panbed
Copy link
Copy Markdown
Contributor

panbed commented Mar 10, 2026

Tested on a course with 1000 files. Takes a while with a batch size of 10 (~3 minutes to delete all files) but it successfully deleted the files without timing out.

The only change I'd recommend making is perhaps changing the background color of the "Delete Selected" button when it is enabled from grey to red to draw a bit more attention to it.

Screenshot 2026-03-10 at 12 20 19 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants