- How do I install and configure laravel-filepond in a Laravel application?
- Install the package via Composer with composer require rahulhaque/laravel-filepond. Publish the configuration file to adjust temporary disk, validation rules, and middleware. The package auto-registers FilePond endpoints, so you only need to point FilePond JS server.url to the process route.
- Which Laravel versions does rahulhaque/laravel-filepond support?
- The package supports Laravel 7 through 13, but documentation is branch-specific for newer versions. Check the changelog for breaking changes when upgrading Laravel. Composer constraints usually handle compatibility automatically.
- How does laravel-filepond handle chunked and resumable uploads?
- The package implements FilePond's patch endpoint to accept file chunks and supports resuming interrupted uploads. Chunked transfers work with both local and external storage, and native AWS S3 multipart upload is supported for efficient large-file handling.
- Can I use laravel-filepond with Amazon S3 or other third-party storage?
- Yes, permanent storage can use any Laravel filesystem disk, including S3 and GCS. However, if you configure temporary storage on a third-party disk, some server-side validation features are disabled. For full validation support, keep temporary files on a local disk.
- How do I validate FilePond uploads on the server with laravel-filepond?
- Use the provided Rule::filepond() validation rule globally in the package config or per-request in your controller. It validates temporary files before they are moved to permanent storage. Custom rules can be added, but test edge cases like malformed filenames carefully.
- Where are temporary files stored and how do I clean them up?
- Temporary files are stored in a configurable local directory defined by temp_folder. A scheduled artisan command, filepond:clear, automatically removes expired files and directories. Monitor this job to prevent disk bloat and secure the temp folder permissions.
- Is laravel-filepond compatible with Spatie laravel-medialibrary?
- Yes, the package integrates with Spatie laravel-medialibrary so you can attach uploaded files to models as media. Use moveTo() or copyTo() to transfer files into medialibrary. Verify version compatibility between the two packages.
- What FilePond endpoints does laravel-filepond provide and how do I customize them?
- The package auto-registers routes for FilePond's process, patch, head, revert, and restore endpoints. You can customize middleware and route prefixes in the configuration file. These endpoints handle the full upload lifecycle, including chunked transfers and file reverts.
- How do I test file uploads with laravel-filepond in Laravel?
- Use Laravel's HTTP testing helpers to simulate requests to the package's FilePond routes. You can fake uploaded files with UploadedFile::fake() and assert temporary storage behavior. For chunked uploads, test the patch endpoint separately to ensure resume logic works.
- What are the limitations or alternatives to laravel-filepond?
- The package is tightly coupled to the FilePond frontend library and is not a generic upload solution. If you need framework-agnostic uploads, consider alternatives like Spatie laravel-medialibrary or custom upload controllers. Also note that third-party temporary storage disables some validation features.