Build secure file upload with validation, storage, and progress tracking
Implement a file upload system for {{PROJECT_CONTEXT}}:
Features:
1. Drag-and-drop and click-to-upload
2. File type validation (images, documents, etc.)
3. File size limits per type
4. Progress tracking with percentage
5. Preview for images before upload
6. Cloud storage integration (S3/Supabase Storage)
7. Thumbnail generation for images
8. Virus scanning placeholder
Provide:
- Upload component with drag-and-drop
- Server-side upload handler with validation
- Storage client configuration
- Progress tracking hook
- File type and size validation
- Error handling for failed uploads
- Thumbnail generation endpointAdding file upload capabilities