Media Picker
MediaPicker is a Filament form component for attaching one or more media items to a model.

Basic usage
Single file
Options
multiple(bool $multiple = true)
Allows selecting more than one file. Defaults to single-select.
relationship(string $relationship, string $titleAttribute)
Wires the picker to an Eloquent relationship (e.g. a BelongsToMany). The selected IDs are synced automatically on save.
disk(string $disk)
Restricts the picker to files on a specific disk.
directory(string $directory)
Restricts browsing to a specific directory.
acceptedFileTypes(array $types)
Overrides the global config('media.accepted_file_types') for this field.
maxSize(int $kilobytes)
Maximum upload size for files selected or uploaded through this picker.
Pivot columns
When using a BelongsToMany relationship with extra pivot data, declare the columns in config:
These columns are passed through to sync() when media is attached. See Pivot Columns.

Edit link
When a media item is selected, the picker shows an edit button that links to the MediaResource edit page. This uses $resource::getUrl('edit', ['record' => $id]) and works correctly in multi-tenant Filament panels.