Skip to content

File picker

te-file reads the selected files and emits them as base64 data URLs, so v-model gives you the content rather than a File handle.

Basic

vue
<te-file />

Restricted and multiple

With multiple, a single file still emits a string; two or more emit an array.

vue
<te-file accept="image/*" multiple />
<te-file size="small" disabled />

Props

PropTypeDefaultDescription
modelValuestring | string[]''Base64 data URL, or an array of them. Supports v-model.
acceptstring''Native accept attribute.
multiplebooleanfalseAllows selecting more than one file.
disabledbooleanfalseDisables the input.
size'small' | 'medium' | 'large''medium'Padding and font size.

Events

EventPayloadDescription
update:modelValuestring | string[]Emitted once every file has been read.

Released under the MIT License.