Search documentation of phoenix_kit

# PhoenixKitWeb.Live.Users.MediaSelector (phoenix_kit v1.6.19)

View Source

Generic media selector LiveView.

Provides a reusable interface for selecting media files from anywhere in the admin panel. Supports both single and multiple selection modes.

## Usage

    # Navigate to selector with query params
    /admin/media/selector?return_to=/admin/blogging/edit&mode=single&filter=image

## Query Parameters

- `return_to` - URL to navigate back to (required)
- `mode` - "single" or "multiple" (default: "single")
- `selected` - Comma-separated pre-selected file IDs (optional)
- `filter` - "image", "video", "all" (default: "all")
- `page` - Page number for pagination (default: "1")

# Summary

## Functions

handle_event(binary, arg2, socket)

Callback implementation for `Phoenix.LiveView.handle_event/3`.

handle_params(params, uri, socket)

Callback implementation for `Phoenix.LiveView.handle_params/3`.

mount(params, session, socket)

Callback implementation for `Phoenix.LiveView.mount/3`.

render(assigns)

Callback implementation for `Phoenix.LiveView.render/1`.

# Functions

# handle_event(binary, arg2, socket)

Callback implementation for `Phoenix.LiveView.handle_event/3`.

# handle_params(params, uri, socket)

Callback implementation for `Phoenix.LiveView.handle_params/3`.

# mount(params, session, socket)

Callback implementation for `Phoenix.LiveView.mount/3`.

# render(assigns)

Callback implementation for `Phoenix.LiveView.render/1`.