Skip to main content
zerotal

Documentation


Documentation / @zerotal/admin / index / mediaPicker

Function: mediaPicker()

mediaPicker(key): Field

Defined in: admin/src/form/Field.ts:811

Pick a file from the media library, or upload a new one into it.

The difference from fileUpload is reuse: an upload field puts a file somewhere and forgets it, while this one catalogues what it stores, so the same image can be chosen again from anywhere in the panel. Needs a media provider on the panel; without one it behaves as a plain upload.

Parameters

key

string

Returns

Field