@samluvanda/uploadx
Version:
Modern, lightweight, and extensible JavaScript file uploader supporting chunked uploads, filtering, retry logic, progress tracking, and event hooks.
92 lines (58 loc) โข 2.58 kB
Markdown
# UploadX
**UploadX** is a modern, configurable, HTML5-powered JavaScript file uploader library. It supports chunked uploads, customizable filters, progress tracking, and more โ all in a lightweight and extensible package.

## ๐ Features
- โ
**Modern JavaScript (ES6+)**
- ๐ **Chunked Upload Support** โ break large files into smaller chunks for better reliability
- ๐ **Configurable & Extensible** โ customize filters, events, headers, size limits, retry logic, and more
- ๐ง **Smart Queue Management** โ automatic progress, retries, and clean error handling
- ๐ฏ **HTML5 File API** โ no legacy code or Flash dependencies
- ๐ **Rich Event System** โ hook into all stages of the upload process
## ๐ฆ Installation
```bash
npm install @samluvanda/uploadx
```
## โ๏ธ Usage
```js
import { Uploader } from 'uploadx';
const uploader = new Uploader({
browse_button: 'browseBtn',
url: '/upload',
filters: {
mime_types: [{ title: 'Images', extensions: 'jpg,jpeg,png,gif' }],
max_file_size: '5mb',
prevent_duplicates: true
},
chunk_size: '1mb',
max_retries: 3,
multi_selection: true,
});
uploader.bind('FileUploaded', (up, file, response) => {
console.log(`Uploaded: ${file.name}`, response);
});
document.getElementById('startBtn').onclick = () => uploader.start();
```
## ๐ Documentation
See [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md)
## ๐ค Contributing
We welcome PRs, issues, and enhancements. Please read our [contributing guide](docs/CONTRIBUTING.md).
## ๐ซฃ Sponsor This Project
If UploadX made your life easier, consider [sponsoring me on GitHub](https://github.com/sponsors/samluvanda). I promise not to use the funds on things like... more coffee โ (okay, maybe just a little).
## ๐ Third-Party Upload Handlers
Several third-party handlers for UploadX exist and may be useful for integration with different backend platforms.
**Please note:** These are external community projects. The UploadX project does not maintain or endorse them.
- **Laravel:** [uploadx-laravel](https://github.com/samluvanda/uploadx-laravel)
Want to contribute your own handler? Open a pull request to list it here.
## ๐งช Browser Compatibility
UploadX uses the HTML5 File API and is compatible with all major modern browsers.
## ๐ License
MIT ยฉ 2025 [Samson Luvanda](mailto:s_luvanda@hotmail.com)