BootstrapUploadInput

open class BootstrapUploadInput(uploadUrl: String? = null, multiple: Boolean = false, className: String? = null, init: BootstrapUploadInput.() -> Unit? = null)

The file upload component for Bootstrap

Parameters

uploadUrl

the optional URL for the upload processing action

multiple

determines if multiple file upload is supported

className

CSS class names

init

an initializer extension function

Constructors

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

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun afterDestroy()
Link copied to clipboard
open fun afterInsert(node: <Error class: unknown class>)
Link copied to clipboard
Link copied to clipboard
open fun buildAttributeSet(attributeSetBuilder: <Error class: unknown class>)
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
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

Returns the value of the file input control as a String.

Link copied to clipboard
open fun lock()

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

Link copied to clipboard
Link copied to clipboard
open fun render(): <Error class: unknown class>
Link copied to clipboard
open fun resetInput()

Resets the file input control.

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
var ajaxSettings: dynamic

Additional ajax settings to pass to the plugin before submitting the ajax request for upload.

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
open var disabled: <Error class: unknown class>

Determines if the field is disabled.

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

Whether to hide the preview content (image, pdf content, text content, etc.) within the thumbnail.

Link copied to clipboard

The maximum file size for upload in KB.

Link copied to clipboard

The minimum file size for upload in KB.

Link copied to clipboard

Determines if multiple file upload is supported.

Link copied to clipboard
open var name: String?

The name attribute of the generated HTML input element.

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

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

Whether to to display the file upload statistics.

Link copied to clipboard
open var size: <Error class: unknown class>?

The size of the input (currently not working)

Link copied to clipboard

Whether the batch upload of multiple files will be asynchronous/in parallel.

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

The validation status of the input.

Link copied to clipboard
open var value: List<<Error class: unknown class>>?

File input value.

Extensions

Link copied to clipboard
suspend fun BootstrapUploadInput.getFileWithContent(kFile: <Error class: unknown class>): <Error class: unknown class>

Returns file with the content read.