Skip to content

Hide upload temp files and remove abandoned ones - #60

Merged
rangoDJ merged 1 commit into
mainfrom
fix/hide-upload-temp-files
Oct 10, 2026
Merged

rangoDJ merged 1 commit into
mainfrom
fix/hide-upload-temp-files

Conversation

@rangoDJ

@rangoDJ rangoDJ commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Fixes #58

What changed

list_files() skips upload temp files (.upload-<32 hex>.part, the exact name save_uploaded_file() uses) and deletes any that haven't been touched for 24 hours: a running upload writes to its file continuously, so an untouched one was cut off by a container stop, when the except cleanup never runs.

Testing

  • pytest: 254 passed, 8 skipped. New tests: temp files aren't listed; a stale one is removed on listing; a running one is kept; names that only look similar (.upload-notes.part, no leading dot, other dotfiles) are still listed; a finished upload leaves no temp file. Two fail without the fix.
  • Not tested in a running container.

🤖 Generated with Claude Code

Uploads are written to .upload-<uuid>.part first, and the file list showed
those while an upload ran. One left by a container stopped mid-upload
stayed for good. Listing now skips them and deletes any untouched for a day.

Fixes #58

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rangoDJ
rangoDJ merged commit dc8eb55 into main Oct 10, 2026
4 checks passed
@rangoDJ
rangoDJ deleted the fix/hide-upload-temp-files branch October 10, 2026 22:11
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.

Upload temp files show up in the shared folder

1 participant