PHPackages                             xakki/file-uploader-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. xakki/file-uploader-laravel

ActiveLibrary[File &amp; Storage](/categories/file-storage)

xakki/file-uploader-laravel
===========================

Chunked file uploader package for Laravel 10-12 (Upload Protocol v1).

0.3.4(1mo ago)08Apache-2.0PHPPHP ^8.3|^8.4|^8.5CI passing

Since Jun 15Pushed 1mo agoCompare

[ Source](https://github.com/Xakki/file-uploader-laravel)[ Packagist](https://packagist.org/packages/xakki/file-uploader-laravel)[ RSS](/packages/xakki-file-uploader-laravel/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

xakki/file-uploader-laravel
===========================

[](#xakkifile-uploader-laravel)

Chunked file uploader for **Laravel 10–12** speaking **[Upload Protocol v1](https://github.com/Xakki/file-uploader/blob/main/protocol/SPEC.md)**, with a Drag &amp; Drop JS widget. Thin binding over the framework-agnostic [`xakki/file-uploader`](https://github.com/Xakki/file-uploader) core.

> **Upgrading from 0.2?** See [MIGRATION.md](MIGRATION.md). The public Laravel API (facades, routes, config, widget) is preserved; only the internals moved to the core.

```
composer require xakki/file-uploader-laravel
```

The service provider is auto-discovered. It registers the routes and, on `package:discover`, publishes the config (without overwriting your edits) and the widget asset automatically. New config keys from package upgrades are merged in at runtime, so an older published `config/file-uploader.php` keeps working. To (re)publish manually:

```
php artisan vendor:publish --tag=file-uploader-config
php artisan vendor:publish --tag=file-uploader-assets
```

Configure
---------

[](#configure)

`config/file-uploader.php` (key options):

```
'disk' => env('FILE_UPLOADER_DISK', 'public'),   // any league/flysystem disk
'directory' => '/',
'chunk_size' => 1024 * 1024,                      // 1 MiB
'max_size' => 1024 * 1024 * 50,                   // 50 MiB
'max_files' => 0,                                 // cap on active (non-deleted) files; 0 = unlimited (FILE_UPLOADER_MAX_FILES)
'allowed_extensions' => [ /* mime => ext map; '*' = any */ ],
'middleware' => ['web', 'auth'],
'route_prefix' => 'file-upload',
'soft_delete' => true,
'trash_ttl_days' => 30,
'public_url_resolver' => null,                    // fn(string $path, $disk): ?string
'full_access' => ['users' => [], 'roles' => []],  // who may manage any file
```

### S3 / CloudFront

[](#s3--cloudfront)

Point `disk` at an `s3` filesystem. For signed/CDN URLs, set `public_url_resolver` to a closure returning the URL for a path (the core never calls `$disk->url()` itself).

Widget
------

[](#widget)

Inject the widget service and render it in a Blade view:

```
public function show(\Xakki\LaravelFileUploader\Services\FileWidget $widget)
{
    return view('page', ['uploader' => $widget->getWidget()]);
}
```

```
{!! $uploader !!}
```

It emits the mount point, the JS config (route URLs + CSRF token + flags, including `maxFiles`) and the published UMD widget from `public/vendor/file-uploader/file-uploader.umd.js`.

The 0.3.2 widget (from [`@xakki/file-uploader`](https://github.com/Xakki/file-uploader/tree/main/js)) supports **theming** (`light` / `dark` / `auto` colour schemes, custom styles) and **i18n** (built-in `en` / `ru`, plus per-string overrides). See the [js README](https://github.com/Xakki/file-uploader/tree/main/js)for the full widget config surface.

HTTP API
--------

[](#http-api)

Registered under `route_prefix` with the configured `middleware`:

Method &amp; pathAction`POST {prefix}/chunks`upload a chunk`GET {prefix}/files`list files`DELETE {prefix}/files/{id}`delete (soft by default)`POST {prefix}/files/{id}/restore`restore from trash`DELETE {prefix}/trash/cleanup`purge expired trashResponses use the shared Upload Protocol v1 envelope, identical to the Symfony binding and the demo.

PHP service
-----------

[](#php-service)

```
$widget = app(\Xakki\LaravelFileUploader\Services\FileWidget::class);
$files = $widget->list();
$widget->delete($id);
$widget->restore($id);
$widget->cleanupTrash();
```

`Services\FileUpload` (uploads) and `Services\FileWidget` (management + widget) are thin subclasses of the core `FileUploader` / `FileManager`, wired to Laravel's disk, Auth, Date and logger.

Console
-------

[](#console)

```
php artisan file-uploader:cleanup          # purge expired trash
php artisan file-uploader:sync-metadata    # rebuild metadata from stored files
```

i18n
----

[](#i18n)

**Server messages** (upload/chunk/trash/cleanup results, plus the `error.*` and `validation.*` codes) are localized from the **shared core catalog** that ships inside `xakki/file-uploader` (`protocol/i18n/.json`, 8 locales: `en ru es pt zh fr de sr`) — the same catalog every binding and the JS client use. The response envelope now also carries the stable `code` (and `params`) that produced the message, so clients can re-localize.

The locale for these messages is resolved per Upload Protocol §5.1: the request `locale`field (only when it is in the `locales` allow-list) → the `locale` config default → `en`. **Note:** this supersedes the previous `app()->getLocale()` behaviour for these server-produced messages — the protocol's per-request `locale` field now drives the language.

The Laravel `UploadChunkRequest` (FormRequest) emits its **per-field validation** messages through Laravel's own localization (the standard `validation.*` lines); only the upload/file result text and the `error.*` / `code` envelope route through the shared core catalog.

Test
----

[](#test)

```
composer install && composer phpunit
```

Related
-------

[](#related)

- **Core (framework-agnostic):** [`Xakki/file-uploader`](https://github.com/Xakki/file-uploader) · Packagist [`xakki/file-uploader`](https://packagist.org/packages/xakki/file-uploader)
- **Sibling Symfony binding:** [`Xakki/file-uploader-symfony`](https://github.com/Xakki/file-uploader-symfony)· Packagist [`xakki/symfony-file-uploader`](https://packagist.org/packages/xakki/symfony-file-uploader)
- **Wire contract:** [Upload Protocol v1 — SPEC.md](https://github.com/Xakki/file-uploader/blob/main/protocol/SPEC.md)
- **JS client / widget:** [`@xakki/file-uploader`](https://github.com/Xakki/file-uploader/tree/main/js)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/426468?v=4)[Xakki](/maintainers/Xakki)[@Xakki](https://github.com/Xakki)

---

Top Contributors

[![Xakki](https://avatars.githubusercontent.com/u/426468?v=4)](https://github.com/Xakki "Xakki (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/xakki-file-uploader-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/xakki-file-uploader-laravel/health.svg)](https://phpackages.com/packages/xakki-file-uploader-laravel)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M135](/packages/roots-acorn)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.5M86](/packages/unisharp-laravel-filemanager)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

78622.3M193](/packages/laravel-mcp)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M348](/packages/psalm-plugin-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
