kvision / pl.treksoft.kvision.form.upload

Package pl.treksoft.kvision.form.upload

Full-featured file upload component with drag & drop, preview and AJAX upload mode.

Types

Upload

open class Upload : SimplePanel, KFilesFormControl

The form field file upload component.

UploadInput

open class UploadInput : Widget, FormInput

The file upload component.

Functions

getContent

suspend fun <K : Any> Form<K>.getContent(key: KProperty1<K, List<KFile>?>, kFile: KFile): KFile
suspend fun <K : Any> FormPanel<K>.getContent(key: KProperty1<K, List<KFile>?>, kFile: KFile): KFile

Returns file with the content read.

upload

fun Container.upload(uploadUrl: String? = null, multiple: Boolean = false, label: String? = null, rich: Boolean = false, init: (Upload.() -> Unit)? = null): Upload

DSL builder extension function.

uploadInput

fun Container.uploadInput(uploadUrl: String? = null, multiple: Boolean = false, classes: Set<String> = setOf(), init: (UploadInput.() -> Unit)? = null): UploadInput

DSL builder extension function.