Skip to content

Fix: Delete uploaded files on session deletion (#90)#394

Open
diksha78dev wants to merge 1 commit into
imDarshanGK:mainfrom
diksha78dev:fix/issue-90
Open

Fix: Delete uploaded files on session deletion (#90)#394
diksha78dev wants to merge 1 commit into
imDarshanGK:mainfrom
diksha78dev:fix/issue-90

Conversation

@diksha78dev

Copy link
Copy Markdown
Contributor

Fixes #90

  • Added logic to physically remove the ./data/uploads/{session_id} directory in the DELETE /api/sessions/{session_id} route using shutil.rmtree.
  • Wrapped the deletion in a try-except block to gracefully handle missing directories or file locks without crashing the API response.
  • Added test_delete_session_removes_files in test_api.py to verify the cleanup behavior.

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

@diksha78dev is attempting to deploy a commit to the Darshan's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Fix: DELETE /api/sessions/{id} doesn't delete uploaded files from disk

1 participant