Documentation / @zerotal/admin / index / storeMedia
Function: storeMedia()
storeMedia(
file,options):Promise<[false,string] | [true,MediaItem]>
Defined in: admin/src/media.ts:234
Move an uploaded file onto its permanent disk and catalogue it.
Order matters: the bytes land first, and only a successful move is catalogued. A catalogue entry pointing at a file that isn't there is worse than a file nobody catalogued, because the panel would keep offering it.
Parameters
file
options
Returns
Promise<[false, string] | [true, MediaItem]>