Use these optional helpers when building your own capture/upload interface. Standard FLEX fields already provide their interface; you do not need to call this API to configure them. Browser helpers do not replace server-side validation or permanent storage.
Load the public module
Resolve the published module URL through Filament rather than hard-coding an asset filename:
For a custom FLEX component, declare the media-os dependency in its component definition’s uses list and load the module when that component activates. Use one resource owner per rendered instance.
Here element is your mounted component element. Call owner.dispose() when your component is destroyed or replaced.
Local preview URLs
Replacing the same key releases its previous object URL. Owner disposal also releases remaining URLs.
Temporary Livewire transfer
Call this inside your own initialized Alpine controller; file is a non-empty Blob/File. The returned identity belongs to Livewire temporary storage. Only one active operation per helper/state path is supported.
Cancellation stops that request. Temporary cleanup follows the server’s configured retention; the browser does not promise permanent storage deletion.
captureBlob is your pending capture variable. The barrier waits for all participating captures before resuming the native form submit. An error blocks submission; fix/resume the upload and submit again. Clear component-owned Blob references on destruction.
Open a camera or microphone
Acquire permission only after the user’s capture action:
For microphone capture:
Close the active session before opening another on that helper. device.close() stops its stream; device.dispose() also prevents reopening it. Disposing the owner stops owned streams, including late permission results.
Capture a decoded photo
Wait until the video has a decoded frame before calling. Supported browser output types are JPEG, PNG and WebP. The server must still validate dimensions, content and file size.
Existing FilePond integration
nativeRegistration must come from your initialized native integration and contain component, pond and its actual ready flag. Do not announce readiness before native initialization finishes. Re-register when that native instance changes.
Individual controls use pause(fileId), resume(fileId) and retry(fileId). Pause/resume restarts native whole-file requests; it is not byte-offset resume.
Helper reference
owner.wait(check, { subscribe, timeoutMs }) waits for your readiness condition; subscribe returns a cleanup function. Deadlines are 1–120,000 ms. FilePond readiness defaults to 15 seconds, processing to 120 seconds. transportOnly in createPondSession() disables native preview presentation for an integration that renders its own file UI.
Cleanup and errors
Listeners registered with owner.listen() and callbacks registered with owner.defer() are released with the instance. Never reuse a disposed owner for a newly mounted field. Keep server attachment authorization in Media OS access policies. Last modified on October 16, 2026