Skip to content

itsnotyoutoday/laravel-filepond

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel FilePond Backend

An all in one Laravel backend for FilePond

We currently support the `process` and `revert` methods and are securing those via the Laravel encryption/decryption methods.

🚀 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"

When you receive the serverId from Filepond (that's the value which you get via the hidden input fields) in your controller you can decode it via:

// Get the temporary path
$filepond = app(Sopamo\LaravelFilepond\Filepond::class);
$path = $filepond->getPathFromServerId($serverId);

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

Filepond setup

Set at least the following Filepond configuration:

FilePond.setOptions({
    name: 'file',
    server: 'https://yourdomain.com/filepond/api/process',
})

About

Laravel backend module for filepond uploads

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%