I am using react typescript radix ui and lucide-react for icons. I need to UI upload multiple files when user select multiple files. the files need to be sent in multiple chunks. how can i do it
I'll create a comprehensive multi-file upload component with chunking support using React TypeScript, Radix UI, and Lucide React icons.
This comprehensive multi-file upload component includes:
The /api/upload-chunk
route handles:
Preview is not working
I'll fix the preview issues by reorganizing the file structure and simplifying the implementation.
I've made several changes to fix the preview:
app/file-upload.tsx
file that was causing conflicts.page.tsx
to correctly reference the component.Simplified the API route:
The component should now work properly in the preview. You can test it by:
Note that in this preview version, files aren't actually saved to disk - this is just a demonstration of the chunking and upload UI. In a production environment, you would connect this to your actual storage solution.