Represents an file upload from an HTML FORM.

no subtypes hierarchy

Initializer
HttpServerFileUpload(HttpServerFileUpload unknown)
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
charsetshared default String charset()
contentTransferEncodingshared default String contentTransferEncoding()
contentTypeshared default String contentType()
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()
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()
nameshared default String name()
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.

Parameters:
  • filename

    the name of the file

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