Laravel/Plupload - Handle large file uploads

Installs: 164 469

Dependents: 1

Suggesters: 0

Security: 0

Stars: 157

Watchers: 8

Forks: 58

Open Issues: 0


V0.9.0 2023-05-05 11:13 UTC

This package is auto-updated.

Last update: 2023-06-05 11:18:03 UTC


Laravel plupload support.

Handeling chunked uploads.


Install using composer

composer require jildertmiedema/laravel-plupload

Add the provider to config/app.php

'providers' => [

If you want to use te build in builder insert the facade

'aliases' => array(
    'Plupload' => JildertMiedema\LaravelPlupload\Facades\Plupload::class,

To publish the assets:

php artisan vendor:publish

Receiving files

Use this route to receive a file on the url /upload. Of course you can place this is a controller.

Route::post('/upload', function()
    return Plupload::receive('file', function ($file)
        $file->move(storage_path() . '/test/', $file->getClientOriginalName());

        return 'ready';

Sending files

There are 3 ways to send files with this plugin.

1. Use default plupload html

Use the examples found on the plupload site.


If you are encountering a Token Mismatch Exception;

TokenMismatchException in VerifyCsrfToken.php line 53:

add in your blade file

<meta name="csrf-token" content="{{ csrf_token() }}">

in your JS file, add

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



	// General settings
	runtimes: 'html5,flash,silverlight,html4',
	url: '/upload/',
	chunk_size: '200kb',
    rename: false,
    dragdrop: true,
	// add X-CSRF-TOKEN in headers attribute to fix this issue
	headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
	// add more overrides; see documentation...


2. Simple plupload builder

To use the builder for creating send form you can use this function:

echo Plupload::make([
    'url' => 'upload',
    'chunk_size' => '100kb',

Note: The options given to the make function are found on in the pluload documentation.

3. Extended plupload builder

echo Plupload::init([
    'url' => 'upload',
    'chunk_size' => '100kb',


Other packages supporting plupload: