sopamo/laravel-filepond
All-in-one Laravel backend for FilePond uploads. Provides endpoints for process/revert/patch, supports chunked uploads, stores files temporarily on any Laravel disk, and helps resolve serverIds to paths so you can move files to final storage.
Full Changelog: https://github.com/Sopamo/laravel-filepond/compare/v1.5.0...v1.6.0
Switch to still-maintained azure-oss driver
Switch to still-maintained azure-oss driver
Switch to still-maintained azure-oss driver
If using matthewbdaly/laravel-azure-storage as a storage driver, we now use azure's append only blobs for much better upload performance when using chunking.
When using this driver, you have to update your filepond config to include the Content-Type when initializing a chunked file upload and enable chunkForce:
FilePond.setOptions({
chunkForce: true, // <-- add this
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() }}",
"Content-Type": file.type, // <-- add this
};
},
},
revert: "/process",
patch: "?patch=",
headers: {
"X-CSRF-TOKEN": "{{ csrf_token() }}",
},
},
});
Improve chunked uploads:
To use the new mime type detection, update your filepond js config:
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() }}'
}
}
});
Full Changelog: https://github.com/Sopamo/laravel-filepond/compare/v1.1.1...v1.2.0
Full Changelog: https://github.com/Sopamo/laravel-filepond/compare/v1.1.0...v1.1.1
Full Changelog: https://github.com/Sopamo/laravel-filepond/compare/v1.0...v1.1.0
V1 brings support for chunking and PHP 8.
Breaking changes
getPathFromServerId no longer returns the full path to the file. Instead, it returns the "disk"-local path. See the updated installation instructions in the readme for a working example.Breaking changes:
The getPathFromServerId no longer returns the full path to the file. Instead it returns the "disk"-local path.
For example:
// Before
/var/www/html/public/storage/filepond/yourFile.jpg
// After
filepond/yourFile.jpg
You have to use Laravel's storage class to access the files now:
$filepond = app(Filepond::class);
$disk = config('filepond.temporary_files_disk');
$filePath = $filepond->getPathFromServerId($serverId);
Storage::disk($disk)->get($filePath); // This returns the file contents as a string
This release allows using PHP 8
This release introduces support for remote disks as temporary file storage! This makes it a lot easier to use in distributed systems. Thanks a lot to @mikemand for the contribution! This release also adds support for Laravel 8.
Add a check to see if an upload request contains a valid file
How can I help you explore Laravel packages today?