Core Features

File Uploads

Handle file uploads and digital signatures.

FilaForms supports file uploads and digital signature capture. Files are stored using Laravel's filesystem with a configurable disk and path.

File Upload Field

The file upload field lets respondents attach files to their submissions. Uploaded files are renamed using ULID-based filenames for uniqueness and stored in an organized directory structure.

Default behavior:

  • Single file per field
  • Maximum file size: 10 MB
  • Preview, download, and open enabled
  • Original filenames are not preserved

Storage Configuration

File storage is configured in config/filaforms.php under the storage key.

config/filaforms.php
'storage' => [
    'disk' => env('FILA_FORMS_STORAGE_DISK', 'local'),
    'path' => 'form-submissions',
],
OptionDefaultEnv VariableDescription
disklocalFILA_FORMS_STORAGE_DISKLaravel filesystem disk to use
pathform-submissions--Base directory for all uploaded files

Directory Structure

Files are organized by form ID and field code:

form-submissions/{form-id}/{field-code}/{ulid}.{ext}

This keeps uploads isolated per form and field, making cleanup and access control straightforward.

Validation

The file upload field type supports these validation rules:

RuleDescription
fileEnsures the uploaded value is a valid file (enabled by default)
mimesRestrict allowed file types with a comma-separated list (e.g., pdf,doc,docx)
maxMaximum file size in kilobytes
requiredField must have a file attached

Signature Field

The signature field provides a canvas pad for capturing handwritten signatures directly in the browser.

PropertyValue
Supported output formatsPNG, JPEG, WebP
Max capture size512 KB
SearchableNo
SortableNo

Signatures are captured as base64 data URIs on the client, then validated, decoded, and stored as image files through the same StorageConfig used by file uploads. The stored path replaces the base64 data in the submission record.

Public vs Private Storage

By default, files use the local disk, which stores files in storage/app/private -- not publicly accessible via URL.

To make uploaded files web-accessible:

Set the Storage Disk

.env
FILA_FORMS_STORAGE_DISK=public
Terminal
php artisan storage:link

Accessing Files

Use Laravel's Storage facade with the configured disk to retrieve file URLs:

Example
use Illuminate\Support\Facades\Storage;

$url = Storage::disk(config('filaforms.storage.disk'))->url($path);

The StorageConfig class provides a convenience method for the same operation:

Example
$url = app(\FilaForms\Core\Support\StorageConfig::class)->url($path);
Copyright © 2026