Resume-Matcher icon indicating copy to clipboard operation
Resume-Matcher copied to clipboard

Duplicate MAX_FILE_SIZE constant defined in resume upload route

Open CodeLoopdroid opened this issue 4 months ago • 0 comments

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:

  1. Go to apps/backend/app/api/router/v1/
  2. Click on resume.py
  3. Scroll down to line 64 and observe MAX_FILE_SIZE = 2 * 1024 * 1024
  4. Scroll further to line 89
  5. 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

Image

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.

CodeLoopdroid avatar Dec 14 '25 13:12 CodeLoopdroid