Prism Docs

Upload

Component for uploading files to the server.

Basic Usage

example-document.pdf
<prism-upload [(fileList)]="files" accept=".png,.jpg,.pdf" />

Drag & Drop

Click or drag file to this area to upload

Support for a single or bulk upload.

<prism-upload [(fileList)]="files" listType="dragger" [multiple]="true" />

Disabled

<prism-upload [(fileList)]="files" [disabled]="true" />

PrismUpload API

NameTypeDefaultDescription
acceptinput<string>''Accepted file types.
multipleinput<boolean>falseWhether multiple files are allowed.
disabledmodel<boolean>falseWhether the upload is disabled.
maxCountinput<number>0Maximum number of files allowed (0 means unlimited).
listTypeinput<'text' | 'dragger'>'text'Type of the upload interface.
fileListmodel<PrismUploadFile[]>[]The two-way bound selected files.
beforeUploadinput<Function>undefinedHook executed before upload. Returning false cancels.
customRequestinput<Function>undefinedCustom upload request handler.
fileChangeoutput<PrismUploadFile[]>-Emitted when file list changes.
removeoutput<PrismUploadFile>-Emitted when a file is removed.