Resume-Matcher
Resume-Matcher copied to clipboard
Duplicate MAX_FILE_SIZE constant defined in resume upload route
Describe the bug
The constant MAX_FILE_SIZE is defined twice in the same file (apps/backend/app/api/router/v1/resume.py). Both definitions have the same value (2 * 1024 * 1024), but the second declaration is redundant and overrides the first, leading to unnecessary duplication and reduced code clarity.
To Reproduce Steps to reproduce the behavior:
- Go to apps/backend/app/api/router/v1/
- Click on resume.py
- Scroll down to line 64 and observe MAX_FILE_SIZE = 2 * 1024 * 1024
- Scroll further to line 89
- Observe the same constant redefined again
Expected behavior
- MAX_FILE_SIZE should be defined only once and reused wherever needed, avoiding redundancy and improving maintainability.
Screenshot
Desktop:
- OS: Windows
- Browser Chrome
- Version latest
Smartphone:
- Device: Not applicable
- OS: Not applicable
- Browser Not applicable
- Version Not applicable
Additional context
- Although both definitions currently have the same value, keeping duplicate constants increases the risk of future inconsistencies if one is modified independently. Removing the duplicate definition will improve readability and maintainability without affecting functionality.