fileDisplay

fun fileDisplay(file: FileUpload, uniqueId: Int = -1, spoiler: Boolean = false, block: InlineFileDisplay.() -> Unit = {})(source)

See FileDisplay.fromFile.

This requires Components V2 to be enabled.

Parameters

file

The file to attach

uniqueId

Unique identifier of this component

spoiler

Hides the file until the user clicks on it

block

Lambda allowing further configuration


fun fileDisplay(fileName: String, uniqueId: Int = -1, spoiler: Boolean = false, block: InlineFileDisplay.() -> Unit = {})(source)

See FileDisplay.fromFileName.

This requires Components V2 to be enabled.

Parameters

fileName

Name of the file, you later have to add the file data with a matching name

uniqueId

Unique identifier of this component

spoiler

Hides the file until the user clicks on it

block

Lambda allowing further configuration