ui-file-upload

Implements a React drag-and-drop file upload component with progress tracking and MinIO backend integration.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/Aurelian1974/ERPEnterprise --skill ui-file-upload-aurelian1974
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ui-file-upload
Source: https://github.com/Aurelian1974/ERPEnterprise/tree/main/.github/skills/ui-file-upload
Command: npx skills add https://github.com/Aurelian1974/ERPEnterprise --skill ui-file-upload-aurelian1974

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires react-dropzone, axios, lucide-react.

What problem does it solve? Building document attachment fields for ERP forms requires handling drag-and-drop, upload progress, file validation, and backend storage integration, which is repetitive and error-prone to implement from scratch each time. ## Core Features & Use Cases - Drag & Drop Upload: Uses react-dropzone to accept PDF and image files with configurable type and size validation. - Progress Feedback: Displays per-file progress bars via axios onUploadProgress, with error states and success indicators. - React Hook Form Integration: Works as a controlled component wired to FormField, uploading files to a backend endpoint that stores them in MinIO. - Use Case: Attach scanned contracts or invoices to a finance record by dropping PDFs into the form field, watching upload progress, and removing files before submission. ## Quick Start Add a FileUpload component to my React Hook Form that accepts PDF and image files up to 10MB and uploads them to the /finance/invoices/attachments endpoint.

Frequently Asked Questions about ui-file-upload

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add drag-and-drop file upload to a React form?▼

Use react-dropzone's useDropzone hook to handle dropped files, then upload each file with axios using FormData and multipart/form-data headers. Wire the component to React Hook Form by passing field.value and field.onChange as props.

How to show upload progress with axios in React?▼

Axios provides an onUploadProgress callback in the request config that reports loaded and total bytes. Calculate the percentage and store it in component state to render a progress bar per file during upload.

Can I upload files directly to MinIO from the frontend?▼

No, this pattern uploads through a backend API endpoint instead of directly to MinIO for security reasons. The backend receives the multipart file, stores it in MinIO, and returns the file ID and metadata.

How do I restrict file types and size in react-dropzone?▼

Pass an accept object mapping MIME types to extensions, plus maxSize in bytes and maxFiles count to the useDropzone options. Files outside these constraints are rejected before upload begins.

Why does my file upload component allow unlimited files?▼

The maxFiles limit must account for already-uploaded files by subtracting the current value length, and the dropzone should be disabled when the limit is reached. Without this check, users can exceed the intended attachment count.