Upload

open class Upload(uploadUrl: String?, multiple: Boolean, label: String?, rich: Boolean, init: Upload.() -> Unit?)

The form field file upload component.

Parameters

uploadUrl

the optional URL for the upload processing action

multiple

determines if multiple file upload is supported

label

label text bound to the input element

rich

determines if label can contain HTML code

init

an initializer extension function

Constructors

Link copied to clipboard
fun Upload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false, init: Upload.() -> Unit? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun blur()
Link copied to clipboard
open fun buildClassSet(classSetBuilder: <ERROR CLASS>)
Link copied to clipboard
open fun cancel()

Cancel an ongoing ajax upload (only for ajax mode).

Link copied to clipboard
open fun clearInput()

Clears the file input control (including the native input).

Link copied to clipboard
open fun focus()
Link copied to clipboard
open fun getNativeFile(kFile: <ERROR CLASS>): <ERROR CLASS>?

Returns the native JavaScript File object.

Link copied to clipboard
open fun getState(): List<<ERROR CLASS>>?
Link copied to clipboard
open fun getValueAsString(): String?
Link copied to clipboard
open fun lock()

Locks the file input (disabling all buttons except a cancel button).

Link copied to clipboard
open fun removeEventListener(id: Int): <ERROR CLASS>
Link copied to clipboard
open fun removeEventListeners(): <ERROR CLASS>
Link copied to clipboard
open fun resetInput()

Resets the file input control.

Link copied to clipboard
open fun <T> setEventListener(block: <ERROR CLASS><T>.() -> Unit): Int
Link copied to clipboard
open fun setState(state: List<<ERROR CLASS>>?)
Link copied to clipboard
open fun subscribe(observer: (List<<ERROR CLASS>>?) -> Unit): () -> Unit
Link copied to clipboard
open fun unlock()

Unlocks the file input.

Link copied to clipboard
open fun upload()

Trigger ajax upload (only for ajax mode).

Properties

Link copied to clipboard
var allowedFileExtensions: Set<String>?

Allowed file extensions.

Link copied to clipboard
var allowedFileTypes: Set<String>?

Allowed file types.

Link copied to clipboard
var browseOnZoneClick: Boolean

Determines if the click on the preview zone opens file browse window.

Link copied to clipboard
var dropZoneEnabled: Boolean

Determines if Drag&Drop zone is enabled.

Link copied to clipboard
var explorerTheme: Boolean

Determines if the explorer theme is used.

Link copied to clipboard
val flabel: <ERROR CLASS>
Link copied to clipboard
val input: UploadInput
Link copied to clipboard
val invalidFeedback: <ERROR CLASS>
Link copied to clipboard
var label: <ERROR CLASS>

The label text bound to the spinner input element.

Link copied to clipboard
var multiple: Boolean

Determines if multiple file upload is supported.

Link copied to clipboard
var placeholder: String?

The placeholder for the upload control.

Link copied to clipboard
var preferIconicPreview: Boolean

Determines if the iconic preview is prefered.

Link copied to clipboard
var required: Boolean

Determines if the input selection is required.

Link copied to clipboard
var rich: <ERROR CLASS>

Determines if label can contain HTML code.

Link copied to clipboard
var showBrowse: Boolean

Determines if the file browse button is shown.

Link copied to clipboard
var showCancel: Boolean

Determines if the cancel button is shown.

Link copied to clipboard
var showCaption: Boolean

Determines if the caption is shown.

Link copied to clipboard
var showPreview: Boolean

Determines if the preview is shown.

Link copied to clipboard
var showRemove: Boolean

Determines if the remove button is shown.

Link copied to clipboard
var showUpload: Boolean

Determines if the upload button is shown.

Link copied to clipboard
var uploadExtraData: (String, Int) -> dynamic?

The extra data that will be passed as data to the AJAX server call via POST.

Link copied to clipboard
var uploadUrl: String?

The optional URL for the upload processing action. If not set the upload button action will default to form submission.

Link copied to clipboard
open var value: List<<ERROR CLASS>>?

File input value.