> ## Documentation Index
> Fetch the complete documentation index at: https://studio.bjanczak.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FLEX Fields integration

> Connect FLEX Fields uploads and rich text to the Studio library.

Use FLEX Fields' upload and rich editor components with your Studio workspaces. The upload factory returns a Studio-backed field that inherits the FLEX presentation and action system. Existing library selections keep their asset and version references.

| Task | Guide |
| - | - |
| Prepare packages, permissions and assets | [Setup](https://studio.bjanczak.com/flex-fields/setup.md) |
| Add Upload file and Choose media to a form | [FileUpload](https://studio.bjanczak.com/filament-flex-file-upload.md) |
| Restrict MIME types, folder access and file counts | [Field configuration](https://studio.bjanczak.com/flex-fields/configuration.md) |
| Configure thumbnails, classic editing and explicit AI acceptance | [Image editing](https://studio.bjanczak.com/flex-fields/image-editing.md) |
| Insert Studio images in FlexRichEditor | [Rich editor](https://studio.bjanczak.com/filament-flex-rich-editor.md) |
| Save references, register usages and handle removed files | [Persistence and lifecycle](https://studio.bjanczak.com/flex-fields/persistence.md) |
| Diagnose missing assets or unavailable actions | [Assets and troubleshooting](https://studio.bjanczak.com/flex-fields/troubleshooting.md) |

## Choose the component

```php theme={null}
use Bjanczak\FilamentFlexFields\Filament\Forms\Components\FlexFileUpload;

FlexFileUpload::mediaStudio('gallery')
    ->studio(
        workspace: $workspaceId,
        moduleUrl: '/studio-assets/studio.js',
        stylesheetUrl: '/studio-assets/studio.css',
        acceptedMimeTypes: ['image/*'],
    )
    ->multiple()
    ->maxFiles(8)
    ->uploadLayout('grid');
```

The example assumes an authorized workspace ULID resolved on the server and the matching Studio distribution served at the configured paths. New uploads are published immediately by this adapter unless configured otherwise. Choosing a file already in Studio stores a reference to that file.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.