Represents an file upload from an HTML FORM.

no subtypes hierarchy

HttpServerFileUpload(HttpServerFileUpload unknown)
Inherited Attributes
Attributes inherited from: Object
hash, string
charsetshared default String charset()

@return the charset for the upload

contentTransferEncodingshared default String contentTransferEncoding()

@return the contentTransferEncoding for the upload

contentTypeshared default String contentType()

@return the content type for the upload

endHandlershared actual default HttpServerFileUpload endHandler(Anything()? endHandler)

Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.

exceptionHandlershared actual default HttpServerFileUpload exceptionHandler(Anything(Throwable)? handler)

Set an exception handler.

filenameshared default String filename()

@return the filename which was used when upload the file.

handlershared actual default HttpServerFileUpload handler(Anything(Buffer)? handler)

Set a data handler. As data is read, the handler will be called with the data.

isSizeAvailableshared default Boolean isSizeAvailable()

@return true if the size of the upload can be retrieved via size.

nameshared default String name()

@return the name of the attribute

pauseshared actual default HttpServerFileUpload pause()

Pause the ReadSupport. While it's paused, no data will be sent to the dataHandler

resumeshared actual default HttpServerFileUpload resume()

Resume reading. If the ReadSupport has been paused, reading will recommence on it.

sizeshared default Integer size()

The size of the upload may not be available until it is all read. Check isSizeAvailable to determine this

streamToFileSystemshared default HttpServerFileUpload streamToFileSystem(String filename)

Stream the content of this upload to the given file on storage.

  • filename

    the name of the file

Inherited Methods
Methods inherited from: Object
Methods inherited from: ReadStream<T>
Methods inherited from: StreamBase