Skip to content

implemented a new file validation logic#222

Open
navtej21 wants to merge 1 commit intoc2siorg:mainfrom
navtej21:navtej_s_nair
Open

implemented a new file validation logic#222
navtej21 wants to merge 1 commit intoc2siorg:mainfrom
navtej21:navtej_s_nair

Conversation

@navtej21
Copy link
Copy Markdown

fix:remove unused variable causing lint error

chore: apply ruff formatting

Fixes an issue where file validation reads the entire uploaded file into memory to determine its size. This can lead to high memory usage and potential crashes for large file uploads.

Replaced full file read with chunked streaming to ensure constant memory usage and early rejection of oversized files.

Brief summary of the changes. Reference any related issues.

Fixes #217

Type of Change

  • [ *] Bug fix
  • New feature
  • Breaking change
  • Documentation update

How Has This Been Tested?

1.Uploaded large CSV files to verify behavior
2.Confirmed oversized files are rejected with HTTP 413
3.Verified memory usage remains stable during upload
4.Tested valid files to ensure normal functionality
5.Describe the tests you ran to verify your changes.

  • [* ] Existing tests pass
  • New tests added
  • [ *] Manual testing

Screenshots (if applicable)

Checklist

  • [ *] My code follows the project's style guidelines
  • [ *] I have performed a self-review
  • I have added/updated documentation as needed
  • [ *] My changes generate no new warnings
  • [ *] Tests pass locally

fix:remove unused variable causing lint error

chore: apply ruff formatting
@0xanshu
Copy link
Copy Markdown

0xanshu commented Mar 23, 2026

you actually write "x" between the square brackets to mark it completed or done, not "*"

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.

File validation loads entire file into memory causing potential memory issues

2 participants