Filepond ​
Facade: Unusualify\Modularous\Facades\Filepond
Accessor: Filepond
Underlying: Unusualify\Modularous\Services\FilepondManager
Provides the server-side handling for FilePond file uploads — processing temporary uploads, generating signed URLs, and managing the temporary file lifecycle.
Methods ​
| Method | Signature | Description |
|---|---|---|
process | (mixed $file): mixed | Handles a FilePond process request; stores the file temporarily and returns the server ID |
validate | (mixed $file): bool | Validates an uploaded file against configured rules |
generateTemporaryUrl | (string $path): string | Generates a signed temporary URL for a stored file |
delete | (string $path): bool | Removes a temporary file by its server path |
getServerConfig | (): array | Returns the FilePond server config array for the frontend |
Usage ​
php
use Unusualify\Modularous\Facades\Filepond;
// In a FilePond process endpoint
public function process(Request $request)
{
return Filepond::process($request->file('filepond'));
}
// Get server config to pass to the Vue component
$serverConfig = Filepond::getServerConfig();Notes ​
- The
getServerConfig()return value is injected into the Inertia page props and consumed by theue-filepondVue component to configure upload endpoints automatically. - Temporary files are stored in the disk defined by
modularous.filepond.diskconfig (default:local). flush:filepondartisan command clears abandoned temporary files.