Skip to content

fix: clear only session-owned files instead of entire upload folder#85

Open
Aman-Cool wants to merge 2 commits into
idtlab:developfrom
Aman-Cool:fix/clear-file-user-isolation
Open

fix: clear only session-owned files instead of entire upload folder#85
Aman-Cool wants to merge 2 commits into
idtlab:developfrom
Aman-Cool:fix/clear-file-user-isolation

Conversation

@Aman-Cool
Copy link
Copy Markdown
Contributor

Related Issues / Pull Requests

NA

Description

Found this while looking at the upload folder handling. When any user clicked "Clear", the code was looping through the entire shared upload folder and deleting every file in it, not just theirs. So if two people were using the app at the same time and one of them hit clear, the other person's file would just vanish mid-computation with no explanation.
Fixed it by tracking which files belong to which session at upload time, and only deleting those on clear.

What changes are proposed in this pull request?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected; for instance, examples in this repository must be updated too)
  • This change requires a documentation update

Checklist:

  • My code modifies existing public API, or introduces new public API, and I updated or wrote documentation
  • I have commented my code
  • My code requires documentation updates, and I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Aman-Cool Aman-Cool requested a review from a team as a code owner March 19, 2026 07:44
@Aman-Cool Aman-Cool requested a review from kaveenh March 19, 2026 07:44
@Aman-Cool
Copy link
Copy Markdown
Contributor Author

@jeanbez @kaveenh, The clear button was deleting every file in the shared upload folder, not just the current user's. Tracked owned files per session and restricted deletion to those only.

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.

1 participant