FileItem

class FileItem : PartData

Represents a file item

Constructors

<init>

FileItem(
    provider: () -> Input,
    dispose: () -> Unit,
    partHeaders: Headers)

Represents a file item

Properties

originalFileName

val originalFileName: String?

Original file name if present

provider

val provider: () -> Input

of content bytes

Inherited Properties

contentDisposition

val contentDisposition: ContentDisposition?

Parsed Content-Disposition header or null if missing

contentType

val contentType: ContentType?

Parsed Content-Type header or null if missing

dispose

val dispose: () -> Unit

to be invoked when this part is no longed needed

headers

val headers: Headers

of this part, could be inaccurate on some engines

name

val name: String?

Optional part name based on Content-Disposition header

partHeaders

val partHeaders: Headers

partName

val partName: String?

Extension Properties

streamProvider

val FileItem.streamProvider: () -> InputStream

Provides file item’s content as an InputStream