UNPKG

@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
# 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. ![badge](https://img.shields.io/badge/uploadx-lightweight-blue) --- ## ๐Ÿš€ 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)