Download the PHP package samluvanda/uploadx-laravel without Composer
On this page you can find all versions of the php package samluvanda/uploadx-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download samluvanda/uploadx-laravel
More information about samluvanda/uploadx-laravel
Files in samluvanda/uploadx-laravel
Package uploadx-laravel
Short Description Laravel integration for UploadX — a modern, chunked JavaScript file uploader.
License MIT
Informations about the package uploadx-laravel
UploadX Laravel
uploadx-laravel is the official Laravel backend integration for UploadX, a modern HTML5-powered JavaScript file uploader library.
It handles chunked file uploads, validation, temporary storage, and final file assembly in a clean, Laravel-native way.
📦 Installation
Then publish the config file into your Laravel app:
This will copy config/uploadx.php
into your application where you can freely modify the available upload profiles.
⚙️ Configuration
After publishing, the config file will be found at:
The configuration file defines upload profiles, which allow you to configure behavior for different types of uploads (e.g. avatars, documents, large videos).
🧩 Example Profile
➕ Adding Your Own Profile
To define a new upload profile, add a new key under profiles
in the config file. For example:
You can now use this profile by specifying it via the request header UploadX-Profile: avatars
.
🧠 Headers Required for Uploads
1. UploadX-Profile
- Purpose: Selects which config profile to apply.
- Default:
"default"
(from config) - Example:
If the header is missing, the default profile (default
) will be used.
2. UploadX-File-Field
- Purpose: Tells the server the field name of the file in the form-data.
- Default:
"file"
- Example:
If you're sending the file under a different field name in JavaScript, this tells Laravel where to find it in $request->file()
.
3. X-CSRF-TOKEN
- Purpose: Ensures the request passes Laravel’s CSRF protection (only needed if the route uses the
web
middleware). - Required: Yes, if CSRF protection is enabled (e.g., in
web.php
) -
How to obtain (in a Blade template):
- Example JavaScript:
🛣️ Sample Route
In your routes/web.php
or routes/api.php
, define the upload endpoint like so:
🧪 Usage Example with UploadX JS
🙌 Contributing
We welcome PRs, issues, and enhancements. Please read CONTRIBUTING.md for details.
📄 License
MIT © 2025 Samson Luvanda