[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
- Open the app
- Upload a video larger than 500MB
- Observe that the upload is rejected immediately
- 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
[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 than500MBare immediately rejected:However, the component also contains a separate validation using
MAX_FILE_SIZEwith an error message indicating a2GBlimit:Additionally, the UI text mentions support for video uploads up to
2GB.This creates inconsistent behavior where:
Location
File:
src/components/FileUpload.tsxSteps to Reproduce
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:
Impact