> ## 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.

# Filament integration

> Connect FLEX Media Studio to your Filament panels, editors and actions.

Add Studio to the panels where your team works. The Filament adapter uses your application's Studio workspaces, storage and access policies.

> [card] [Pick existing media](https://studio.bjanczak.com/filament-media-picker.md)
>
> Save a pinned cover image, document or ordered gallery.

> [card] [Upload to Studio](https://studio.bjanczak.com/filament-studio-file-upload.md)
>
> Send native Filament uploads to a workspace or folder.

> [card] [Insert media into an editor](https://studio.bjanczak.com/filament-editors.md)
>
> Connect RichEditor, MarkdownEditor or FLEX Rich Editor.

> [card] [Display media on records](https://studio.bjanczak.com/filament-media-entry.md)
>
> Render Studio thumbnails in an Infolist or table column.

> [card] [Add Filament actions](https://studio.bjanczak.com/filament-actions.md)
>
> Choose, download, move, rename, trash and restore files.

> [card] [Configure panel access](https://studio.bjanczak.com/filament-permissions.md)
>
> Use Spatie with optional Guardian or Shield support.

## Setup

Follow the [panel setup guide](https://studio.bjanczak.com/filament-setup.md) to deploy the browser build and
verify a complete form. The [PHP configuration reference](https://studio.bjanczak.com/filament-configuration.md)
lists the Studio-specific options and defaults for each component.

1. [Install the Studio Laravel package and migrations](https://studio.bjanczak.com/installation.md) in the host
   application. Register the panel's user model in Studio's principal map.
2. [Create Studio permission definitions](https://studio.bjanczak.com/filament-permissions.md) for the panel's
   authentication guard and assign the appropriate permissions. Give the user
   access to the workspace used by the component.
3. Publish the matching Studio browser distribution. Use its standalone
   studio.js, studio.css and studio-mark.svg, and serve rich-editor-extension.js
   beside studio.js when integrating RichEditor. Point each field at the module
   and stylesheet URLs served by your application.
4. On a tenant panel, [register TenantStudioPlugin](https://studio.bjanczak.com/filament-tenancy.md) so picker
   requests, thumbnails and file delivery keep the authenticated tenant context.

The component examples use application-owned workspace and folder ULIDs and
published asset URLs. Resolve IDs from the current authorized record, user or
tenant. Studio handles media access and version resolution alongside your host
model's Filament policies.

## Choose a component

| Goal | Component |
| - | - |
| Store an existing file or ordered gallery from a Studio workspace | [Studio Media Picker](https://studio.bjanczak.com/filament-media-picker.md) |
| Upload through native Filament and store the result in Studio | [Studio FileUpload](https://studio.bjanczak.com/filament-studio-file-upload.md) |
| Keep FLEX Fields upload and layout controls | [FLEX Fields FileUpload](https://studio.bjanczak.com/filament-flex-file-upload.md) |
| Render thumbnails in a record detail view | [Studio Media Entry](https://studio.bjanczak.com/filament-media-entry.md) |
| Render thumbnails in a resource table | [Studio Media Column](https://studio.bjanczak.com/filament-media-column.md) |
| Insert media at the cursor | [Editors](https://studio.bjanczak.com/filament-editors.md) |
| Build a custom Filament action with media selection | [StudioPicker field](https://studio.bjanczak.com/filament-picker-field.md) |

## Use native FileUpload

Use Filament's `FileUpload` when your application owns the saved file. The disk
and directory below are Laravel storage settings. The destination is the
`campaigns/covers` prefix on the `s3` disk.

```php theme={null}
use Filament\Forms\Components\FileUpload;

FileUpload::make('cover_path')
    ->label('Campaign cover')
    ->image()
    ->maxSize(10240)
    ->preventFilePathTampering()
    ->disk('s3')
    ->directory('campaigns/covers')
    ->visibility('private');
```

To display the saved original and its conversions in Studio, configure an
[application media source](https://studio.bjanczak.com/application-files.md#register-originals-and-variants-on-your-own-models).
Have the owning model register the stored path and metadata when the record is
saved. Register each conversion when your processing job completes. Studio shows
the registered media in **App assets**, where the owning application retains
control of file replacement and deletion.

If you already use Spatie Media Library, let Spatie own the upload and its
conversions. [Mount the collection](https://studio.bjanczak.com/spatie-media-library.md) and choose which
ready conversions Studio should use for thumbnails and previews. Spatie is
optional for the native FileUpload example above.

## Upload directly into a Studio workspace

Use [StudioFileUpload](https://studio.bjanczak.com/filament-studio-file-upload.md) for a native FileUpload
field backed by Studio. Configure the workspace, the upload folder, the
accepted MIME types and whether the field can select existing assets. Studio
uses the workspace's storage and processing settings, including S3 where
configured.


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