Skip to content

Feat: add user friendly share page.#5

Merged
arabcoders merged 4 commits intomasterfrom
dev
Dec 30, 2025
Merged

Feat: add user friendly share page.#5
arabcoders merged 4 commits intomasterfrom
dev

Conversation

@arabcoders
Copy link
Owner

@arabcoders arabcoders commented Dec 30, 2025

This pull request updates the documentation and codebase to improve security and maintainability in the upload handling system. The most significant change is the switch from sequential integer upload IDs to random, URL-safe string public_ids for uploads, which affects both the API documentation and backend logic. Additionally, the cleanup logic in the backend is refactored for clarity and better type safety, and some CLI utilities are improved for usability and maintainability.

API and Documentation Updates:

  • All API endpoints and documentation now use public_id (an 18-character URL-safe random string) instead of integer IDs for uploads.

Backend Cleanup Logic Refactoring:

  • Refactored cleanup functions in backend/app/cleanup.py to:
    • Return the number of records affected for better observability and testability.
    • Use more explicit type annotations and improved variable naming for clarity.
    • Remove batching logic in favor of simpler, all-at-once queries, as the risk of memory overload is mitigated by expected data volumes.
    • Add and clarify docstrings for maintainability.

CLI Improvements:

  • Moved the parse_size function to a shared utility module and improved error handling for invalid size inputs in CLI commands.
  • Added docstrings and type annotations to CLI functions for clarity.
  • Updated token viewing logic to use the correct endpoint and improved response handling.

@arabcoders arabcoders merged commit ebc71ea into master Dec 30, 2025
7 checks passed
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