BootstrapUpload

open class BootstrapUpload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false, init: BootstrapUpload.() -> Unit? = null)

The form field file upload component for Bootstrap.

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
constructor(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false, init: BootstrapUpload.() -> 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: unknown 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
suspend fun BootstrapUpload.getFileWithContent(kFile: <Error class: unknown class>): <Error class: unknown class>

Returns file with the content read.

Link copied to clipboard
open fun getNativeFile(kFile: <Error class: unknown class>): <Error class: unknown class>?

Returns the native JavaScript File object.

Link copied to clipboard
open fun getState(): List<<Error class: unknown class>>?
Link copied to clipboard
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)
Link copied to clipboard
Link copied to clipboard
open fun resetInput()

Resets the file input control.

Link copied to clipboard
open fun <T> setEventListener(block: <Error class: unknown class><T>.() -> Unit): Int
Link copied to clipboard
open fun setState(state: List<<Error class: unknown class>>?)
Link copied to clipboard
open fun subscribe(observer: (List<<Error class: unknown 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

Allowed file extensions.

Link copied to clipboard

Allowed file types.

Link copied to clipboard

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

Link copied to clipboard

Determines if Drag&Drop zone is enabled.

Link copied to clipboard

Determines if the explorer theme is used.

Link copied to clipboard
val flabel: <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
val invalidFeedback: <Error class: unknown class>
Link copied to clipboard
var label: <Error class: unknown class>

The label text bound to the spinner input element.

Link copied to clipboard

Determines if multiple file upload is supported.

Link copied to clipboard

The placeholder for the upload control.

Link copied to clipboard

Determines if the iconic preview is prefered.

Link copied to clipboard

Determines if the input selection is required.

Link copied to clipboard
var rich: <Error class: unknown class>

Determines if label can contain HTML code.

Link copied to clipboard

Determines if the file browse button is shown.

Link copied to clipboard

Determines if the cancel button is shown.

Link copied to clipboard

Determines if the caption is shown.

Link copied to clipboard

Determines if the preview is shown.

Link copied to clipboard

Determines if the remove button is shown.

Link copied to clipboard

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

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: unknown class>>?

File input value.