OpenCut-app / OpenCut-app/OpenCut
[FEATURE] File Size Validation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 89.8k
- Forks
- 8.9k
- PR merge metrics
- No merged PRs in 30d
Description
Problem
No validation for file sizes before uploading. Large files can cause browser crashes or storage issues.
Users can accidentally upload huge files, causing performance problems.
Solution
Pre-upload Validation with Hard Limits
- Validate file size before processing starts
- Reject files exceeding configured limits immediately
- Show clear error messages with file size info
- Different limits for images, videos, and audio
- Pros: Simple, prevents issues early
- Cons: May be too restrictive for some use cases
Alternative
Approach 1: Soft Limits with Warnings
- Allow uploads but show warnings for large files
- Provide "Continue anyway" option
- Track large files separately
- Pros: Flexible, user-friendly
- Cons: Users might ignore warnings
Approach 2: Progressive Upload with Chunking
- Split large files into chunks
- Upload chunks progressively
- Validate chunk size
- Pros: Handles very large files, better UX
- Cons: Complex implementation, requires chunking logic
Implementation Details:
- Add file size limits (configurable, with sensible defaults)
- Images: 50MB default, configurable up to 200MB
- Videos: 500MB default, configurable up to 2GB
- Audio: 100MB default, configurable up to 500MB
- Show warnings for large files with file size info
- Provide file size information in media panel (already have
file.size) - Option to compress images before adding (using browser-image-compression or similar)
- Check available quota using
navigator.storage.estimate() - Display storage usage indicator
Anything else?
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the media panel and the existing use of file.size. Decide which validation approach and file-type limits are in scope, then determine how warnings, quota checks, compression, or chunking should interact. Done should include configurable limits, clear size-related feedback, and a defined behavior for oversized uploads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100