react-fast-uploader
v2.2.6
Published
Upload files in React instantly — with just one line. No backend code. No config. Just speed and progress — using your own free PHP server.
Maintainers
Readme
⚡ React Fast Uploader
A lightning-fast file uploader for React applications. Built with ❤️ by Muhammad Jazib at VWeb Australia
✨ Features
- 🚀 Lightning Fast – Chunked uploads (5MB chunks)
- 📊 Real-time Progress – Track upload status instantly
- 🔄 Multiple Files – Upload many files at once
- ⚡ Simple Integration – Just one hook, that’s it!
- 🛡️ Smart Validation – 500MB size limit protection
- 📱 Mobile Ready – Works everywhere
🚀 Quick Start
npm install react-fast-uploader💡 Super Simple Usage
import { useUploader } from 'react-fast-uploader';
function App() {
const { info, upload } = useUploader();
return (
<div>
<input type="file" multiple onChange={upload} />
{info.uploading && <p>Uploading: {info.progress}</p>}
</div>
);
}🎯 What You Get
const { info, upload } = useUploader();
// info = {
// progress: "75%", // Upload progress
// files: [...], // Uploaded file URLs
// uploading: true/false, // Upload status
// error: {...}, // Error details if any
// uploaded: true/false // Upload complete?
// }🌟 Real World Example
import { useUploader } from 'react-fast-uploader';
function FileUploader() {
const { info, upload } = useUploader();
return (
<div className="uploader">
<input type="file" multiple onChange={upload} />
{info.uploading && (
<div className="progress">
<p>Uploading... {info.progress}</p>
<progress value={parseFloat(info.progress)} max="100" />
</div>
)}
{info.error?.error && (
<div className="error">
{info.error.msg}
</div>
)}
{info.uploaded && (
<div className="success">
<h3>✨ Upload Complete!</h3>
<ul>
{info.files.map((file, index) => (
<li key={index}>{file}</li>
))}
</ul>
</div>
)}
</div>
);
}🛠️ Under the Hood
- Chunked Uploads: Files are split into 5MB chunks for smooth uploading
- Progress Tracking: Real-time progress for both single and multiple files
- Error Handling: Smart error detection and user-friendly messages
- Size Validation: Prevents uploads over 500MB total size
🤝 Support & Community
- 💬 Questions? Open an issue
- 📸 Follow me on Instagram
- 🌐 Visit VWeb Australia
📄 License
ISC © Muhammad Jazib
🇦🇺 Made with ❤️ in Australia
