Skip to content

[BUG] File upload validation contains conflicting size limits (500MB vs 2GB) #701

@charu2210

Description

@charu2210

[BUG] File upload validation contains conflicting size limits (500MB vs 2GB)

Bug Description

The file upload validation logic currently contains conflicting maximum file size limits.

In src/components/FileUpload.tsx, files larger than 500MB are immediately rejected:

if (file.size > 500 * 1024 * 1024) {
  setError("File size exceeds 500MB limit. Please select a smaller video.");
  return;
}

However, the component also contains a separate validation using MAX_FILE_SIZE with an error message indicating a 2GB limit:

if (file.size > MAX_FILE_SIZE) {
  setError(
    `File too large (${formatBytes(file.size)}). Maximum allowed size is 2GB.`
  );
  return;
}

Additionally, the UI text mentions support for video uploads up to 2GB.

This creates inconsistent behavior where:

  • the UI claims 2GB support,
  • but uploads above 500MB are rejected before reaching the 2GB validation.

Location

File:
src/components/FileUpload.tsx


Steps to Reproduce

  1. Open the app
  2. Upload a video larger than 500MB
  3. Observe that the upload is rejected immediately
  4. Compare this with the UI text stating support up to 2GB

Expected Behavior

The upload validation limits and UI messaging should remain consistent.


Actual Behavior

Files above 500MB are rejected even though the UI and secondary validation indicate support up to 2GB.


Suggested Fix

Possible fixes:

  • align all validations to the intended maximum size,
  • remove redundant/conflicting validation logic,
  • update UI messaging to match actual upload limits.

Impact

  • Confusing UX
  • Inconsistent validation behavior
  • Misleading upload size support messaging

Metadata

Metadata

Assignees

Labels

bugSomething isn't working correctlytype:bugBug fixtype:designUI/UX design

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions