sopamo/laravel-filepond

Laravel backend module for filepond uploads
317,412 215
Install
composer require sopamo/laravel-filepond
Latest Version:v1.6.0
PHP:^7.0|^8.0
License:MIT
Last Updated:Apr 29, 2026
Links: GitHub  ·  Packagist
Maintainer: Sopamo

:rocket: Be up and running in 2 minutes

Laravel setup

Require this package in the composer.json of your Laravel project.

composer require sopamo/laravel-filepond

If you need to edit the configuration, you can publish it with:

php artisan vendor:publish --provider="Sopamo\LaravelFilepond\LaravelFilepondServiceProvider"
// Get the temporary path using the serverId returned by the upload function in `FilepondController.php`
$filepond = app(\Sopamo\LaravelFilepond\Filepond::class);
$disk = config('filepond.temporary_files_disk');

$path = $filepond->getPathFromServerId($serverId);
$fullpath = Storage::disk($disk)->get($filePath);


// Move the file from the temporary path to the final location
$finalLocation = public_path('output.jpg');
\File::move($fullpath, $finalLocation);

External storage

You can use any Laravel disk as the storage for temporary files. If you use a different disk for the temporary files and the final location, you will need to copy the file from the temporary location to the new disk then delete the temporary file yourself.

If you are using the default local disk, make sure the /storage/app/filepond directory exists in your project and is writable.

Filepond client setup

This is the minimum Filepond JS configuration you need to set after installing laravel-filepond.

FilePond.setOptions({
  server: {
    url: '/filepond/api',
    process: {
      url: "/process",
      headers: (file: File) => {
        // Send the original file name which will be used for chunked uploads
        return {
          "Upload-Name": file.name,
          "X-CSRF-TOKEN": "{{ csrf_token() }}",
        }
      },
    },
    revert: '/process',
    patch: "?patch=",
    headers: {
      'X-CSRF-TOKEN': '{{ csrf_token() }}'
    }
  }
});

Package development

Please make sure all tests run successfully before submitting a PR.

Testing

  • Start a docker container to execute the tests in with docker run -it -v $PWD:/app composer /bin/bash
  • Run composer install
  • Run ./vendor/bin/phpunit

Related Packages

fsasvari/laravel-uploadify

Library for Laravel that handles image uploading with renaming, showing thumbnai...

502 11
felipeweb11/laravel-easymutators

Value object mutation solution for Laravel 5.

3,268 6
unisharp/laravel-filemanager

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

3,540,342 2,152
antennaio/laravel-clyde

Image uploads and manipulation for Laravel, a wrapper around Glide

2,621 29
mixdinternet/laravel-stapler-extra

This package add some features that laravel-stapler doesn't have

2,241 0