react-fast-uploader
Version:
Upload files in React instantly — with just one line. No backend code. No config. Just speed and progress — using your own free PHP server.
138 lines (100 loc) • 3.73 kB
Markdown
# ⚡ React Fast Uploader



[](https://instagram.com/itxmuhammadjazib)
[](https://github.com/mdjazib)




> A lightning-fast file uploader for React applications. Built with ❤️ by [Muhammad Jazib](https://github.com/mdjazib) at [VWeb Australia](https://vweb.com.au)
## ✨ 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
```bash
npm install react-fast-uploader
```
## 💡 Super Simple Usage
```jsx
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
```jsx
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
```jsx
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](https://github.com/mdjazib/react-fast-uploader/issues)
- 📸 **Follow me** on [Instagram](https://instagram.com/itxmuhammadjazib)
- 🌐 **Visit** [VWeb Australia](https://vweb.com.au)
## 📄 License
ISC © [Muhammad Jazib](https://github.com/mdjazib)
**🇦🇺 Made with ❤️ in Australia**