← @mortar-kit/core

Assetinterface

import { Asset } from '@mortar-kit/core'

interface Asset

An uploaded file, as Assets.list returns it.

Properties

key: string

The key documents store, e.g. hero-photo-x7k2q9.jpg.

name: string

The name it was uploaded as, lowercased (hero-photo.jpg).

kind: AssetKind
type: string

MIME type, from the extension.

size: number

Size in bytes.

src: string

URL to load it from (BlobStore.url).

modified?: string

When it was stored (ISO 8601), if the store knows.

title: string

Default title: copied into an image or file field when the asset is picked. '' if none.

alt: string

Default alt text (images): copied into an image field when the asset is picked. '' if none.

folder: string

The id of the folder it is in, or '' for none.