PHPackages                             evgen-dev/plupload-for-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. evgen-dev/plupload-for-laravel

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

evgen-dev/plupload-for-laravel
==============================

Laravel/Plupload - Handle large file uploads

v0.1.2(2y ago)1111MITPHPPHP &gt;=7.4.2

Since Jun 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/evgen-dev/plupload-for-laravel)[ Packagist](https://packagist.org/packages/evgen-dev/plupload-for-laravel)[ RSS](/packages/evgen-dev-plupload-for-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

plupload-for-laravel
====================

[](#plupload-for-laravel)

Laravel plupload support.

Handeling chunked uploads.

Installation
------------

[](#installation)

Install using composer

```
composer require evgen-dev/plupload-for-laravel
```

Add the provider to `config/app.php`

```
'providers' => [
    EvgenDev\LaravelPlupload\LaravelPluploadServiceProvider::class,
]
```

And the facade for short record if you want

```
'aliases' => array(
    'Plupload' => EvgenDev\LaravelPlupload\Facades\Plupload::class,
),
```

Using
=====

[](#using)

1. Create localization file `resources/lang/en/validation.php` file if not exists and add lines:
------------------------------------------------------------------------------------------------

[](#1-create-localization-file-resourceslangenvalidationphp-file-if-not-exists-and-add-lines)

```
return [
    'invalid_file_extension' => 'It is forbidden to upload .:extension files',

    'max' => [
        'file' => 'The :attribute field must not be greater than :max :units.',
    ]
];
```

2. Add upload routes
--------------------

[](#2-add-upload-routes)

### Basic usage without any limitations:

[](#basic-usage-without-any-limitations)

```
Route::post('/upload', function(){
    return Plupload::receive('file', function($file){
        $file->move(storage_path() . '/plupload/', $file->getClientOriginalName());
        return true;
    });

});
```

### Limit uploading file size:

[](#limit-uploading-file-size)

```
use EvgenDev\LaravelPlupload\Filters\Filesize;

Route::post('/upload', function(){
    return Plupload::sizelimit(3, Filesize::FILE_SIZE_UNITS_MB)
    ->receive('file', function($file){
        $file->move(storage_path() . '/plupload/', $file->getClientOriginalName());
        return true;
    });
});
```

### Limit uploading file extensions:

[](#limit-uploading-file-extensions)

```
Route::post('/upload', function()
{
    return Plupload::extensions(['jpg', 'png', 'gif'])->receive('file', function($file){
        $file->move(storage_path() . '/plupload/', $file->getClientOriginalName());
        return true;
    });

});
```

### Limit uploading file size and files extensions:

[](#limit-uploading-file-size-and-files-extensions)

```
use \EvgenDev\LaravelPlupload\Filters\Filesize;

Route::post('/upload', function()
{
    return Plupload::sizelimit(5, Filesize::FILE_SIZE_UNITS_MB)
    ->extensions(['jpg', 'png', 'gif'])
    ->receive('file', function($file){
        $file->move(storage_path() . '/plupload/', $file->getClientOriginalName());
        return 'ready';
    });
});
```

### Usage in controller

[](#usage-in-controller)

```
use EvgenDev\LaravelPlupload\Facades\Plupload;

public function upload(Request $request){
    return Plupload::sizelimit(5, Filesize::FILE_SIZE_UNITS_MB)
        ->extensions(['txt'])
        ->receive('file', function($file){
            $filename = uniqid().'.'.$file->extension();
            $file->move(storage_path() . '/plupload/', $filename);
            return ['success' => true, 'filename' => $filename];
        });
}
```

3. csrf-token validation
------------------------

[](#3-csrf-token-validation)

There are two ways.

### 1. Passing the token

[](#1-passing-the-token)

Add in your blade file

```

```

in your Plupload inititalization JS file, add

```
headers: {
    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
```

Don't forget to refresh the token after each request.

### 2. Disabling token validation

[](#2-disabling-token-validation)

Add to your route rule:

```
->withoutMiddleware([\App\Http\Middleware\VerifyCsrfToken::class]);
```

It should turn out like this:

```
Route::post('/upload', function()
{
    return Plupload::receive('file', function($file){
        $file->move(storage_path() . '/plupload/', $file->getClientOriginalName());
        return true;
    });

})->withoutMiddleware([\App\Http\Middleware\VerifyCsrfToken::class]);
```

4. Preventing chunk uploading after file size or extension error
----------------------------------------------------------------

[](#4-preventing-chunk-uploading-after-file-size-or-extension-error)

Add to your JS file event handling:

```
uploader.bind('ChunkUploaded', function(up, file, response) {
        response = jQuery.parseJSON(response.response);
        if(response.error && (response.error.code == 413 || response.error.code == 415)){
            alert(response.error.message);
            file.destroy();
        }
        up.refresh();
    });
```

Enjoy!

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

Every ~0 days

Total

3

Last Release

1060d ago

PHP version history (2 changes)v0.1.0PHP &gt;=7.2.5

v0.1.2PHP &gt;=7.4.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/639945dd65542d1ada3ee3473024c19de979b2debff33ac5f4e521a8281129b9?d=identicon)[evgen-dev](/maintainers/evgen-dev)

---

Top Contributors

[![evgen-dev](https://avatars.githubusercontent.com/u/10253845?v=4)](https://github.com/evgen-dev "evgen-dev (5 commits)")

---

Tags

laravelpluloadlarge files

### Embed Badge

![Health badge](/badges/evgen-dev-plupload-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/evgen-dev-plupload-for-laravel/health.svg)](https://phpackages.com/packages/evgen-dev-plupload-for-laravel)
```

###  Alternatives

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[unisharp/laravel-filemanager

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

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[jildertmiedema/laravel-plupload

Laravel/Plupload - Handle large file uploads

177232.7k](/packages/jildertmiedema-laravel-plupload)[spatie/laravel-google-cloud-storage

Google Cloud Storage filesystem driver for Laravel

2408.9M13](/packages/spatie-laravel-google-cloud-storage)[zanysoft/laravel-zip

laravel-zip is the world's leading zip utility for file compression and backup.

3142.8M15](/packages/zanysoft-laravel-zip)[dcblogdev/laravel-dropbox

A Laravel Dropbox v2 package

3263.0k](/packages/dcblogdev-laravel-dropbox)

PHPackages © 2026

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