Fileupload

A fileupload dialog used to let user upload a file.The fileupload component is not a modal dialog. Rather, it is a component, so it is placed inline with other components.

<image id="img"/>
Upload your hot shot:

<fileupload onUpload="img.setContent(event.media)"/>

Class Name

org.zkoss.zul.Fileupload

Properties

Property

Description

Data Type

Default Value

number

Sets the maximal allowed number of files to upload.

int

1

template

Sets the template used to create the upload modal dialog.

Template: ~./zul/html/fileuploaddlg.zul

Note: the template has no effect, if you use Fileupload as a component (and embed it to a page).

String

~./zul/html/fileuploaddlg.zul

Methods

Name

Description

Return Data Type

get()

Opens a modal dialog with the default message and title, and let user upload a file.

org.zkoss.util.media.Media

get(int max)

Opens a modal dialog to upload multiple files with the default message and title.

org.zkoss.util.media.Media[]

get(java.lang.String message, java.lang.String title)

Opens a modal dialog with the specified message and title, and let user upload a file.

org.zkoss.util.media.Media

get(java.lang.String message, java.lang.String title, int max)

Opens a modal dialog to upload multiple files with the specified message and title.

org.zkoss.util.media.Media[]

isChildable()

Determines whether it accepts child components

Value: false

Note: No child is allowed.

boolean

onClose()

Handles the onClose event which is sent when file(s) is uploaded or when the cancel button is pressed.

void

Inherited From