rahulhaque/laravel-filepond
Straightforward backend for Laravel apps using the FilePond upload library. It manages temporary storage, validation and cleanup, supports single/multiple, chunked and native S3 multipart uploads with resume, covers process, patch, head, revert and restore endpoints, and works with Spatie medialibra...
Architecture fit
process / patch / head / revert / restore server protocol, which is otherwise hand-rolled on every project. This replaces ~500+ lines of custom controller, temp-storage, and cleanup logic with a facade + a validation rule.Filepond model for upload tracking, routes protected by web + auth middleware, and a scheduled artisan command for expiry cleanup. No queue, no daemon, no separate service — nothing new in the runtime topology.laravel-medialibrary and filepond-plugin-file-metadata, which matters if media handling is already standardised on Medialibrary.auth middleware default need deliberate handling.Integration feasibility
composer require rahulhaque/laravel-filepond:"^13.0", publish provider assets, php artisan migrate, add the scheduler entry, wire FilePond.setOptions({ server: { url: config('filepond.server.url') } }). Realistically a half-day spike for one field.Filepond::field($request->avatar)->moveTo('avatars/avatar-1'), copyTo(), delete(), and Rule::filepond([...]) for request-level validation. Returned file info is a plain array, which keeps controller code readable and testable.temp_disk points at third-party storage, files never land on the app server and Rule::filepond() cannot validate them. That forces an architecture decision up front (local temp + move, versus direct-to-cloud + validate elsewhere) that is not reversible without rework.Technical risk
/process time and validation happens later at controller time. Any validation failure after upload leaves an orphan until the cleanup command runs — acceptable, but needs to be budgeted for.Key questions
Rule::filepond() server-side validation) or direct-to-S3 (losing it)? This is the single biggest fork in the road.chunkUploads + S3 multipart, or is a simple single-POST sufficient?checkOwnership logic and the auth middleware override.Stack fit
<input type="file"> + @csrf patterns, so no form-architecture change is required.public disk and is overridable per-call via the moveTo($path, $disk) second parameter, so multi-bucket/multi-disk setups are supported without forking.Migration path
moveTo()/copyTo(), we can migrate one form field at a time and leave legacy handlers untouched.fileponds table) — low risk to introduce, but the 12.x→13.x upgrade note means we should pin the major version to our Laravel version in composer.json and treat the framework upgrade as a planned, tested work item rather than a routine composer update.soft_delete: true by default means uploaded-file records accumulate rather than disappear; if we migrate from a system with hard deletes, table growth characteristics change and should be reviewed.Compatibility
^13.0 for Laravel 13, etc.). This is the package's most rigid constraint and should be codified in the dependency policy.filepond* in the except array, or JSON responses get polluted — a trivial but genuinely breaking footgun worth putting in onboarding docs.Rule::filepond() is silently unavailable in the third-party-temp-disk configuration — this needs an explicit architectural decision record, not a discovery in QA.Sequencing
Rule::filepond() validation, moveTo() to the public disk. Prove the end-to-end happy path and the validation-failure path.php artisan filepond:clear into the scheduler, alert on temp-directory size and fileponds table row count, verify permissions in each environment.chunkUploads: true and S3 multipart only where the size distribution justifies it.UploadService so the facade and the Rule::filepond usage are the only places that would need to change if we fork or swap the package.Maintenance
soft_delete: true default means the fileponds table is an append-mostly audit log. Decide deliberately whether we want that retention and add a pruning policy if not.Support
Scaling
temp_disk is cloud-backed.web + auth middleware default is correct for scale in the sense that it prevents anonymous upload abuse, but it also means any public/unauthenticated upload flow needs its own rate limiting — the package does not provide throttling out of the box.Failure modes
Rule::filepond() throws "file not found"; this is a configuration-shaped landmine that only surfaces in the validation path.filepond:clear --all is a truncate-and-delete-everything operation. It must never be reachable from automation or a habitual operator keystroke; scope it to a documented break-glass runbook.Ramp-up
field → moveTo/copyTo/delete, plus Rule::filepond) is small enough to hold in head.server.url, CSRF headers, revert/restore semantics, and the chunkUploads flag. Budget front-end time accordingly.How can I help you explore Laravel packages today?