Class: HttpServerFileUpload

vertx-js/http_server_file_upload~ HttpServerFileUpload

new HttpServerFileUpload()

Represents an file upload from an HTML FORM.
Source:

Methods

charset() → {string}

Source:
Returns:
the charset for the upload
Type
string

contentTransferEncoding() → {string}

Source:
Returns:
the contentTransferEncoding for the upload
Type
string

contentType() → {string}

Source:
Returns:
the content type for the upload
Type
string

endHandler(endHandler) → {HttpServerFileUpload}

Parameters:
Name Type Description
endHandler function
Source:
Returns:
Type
HttpServerFileUpload

exceptionHandler(handler) → {HttpServerFileUpload}

Parameters:
Name Type Description
handler function
Source:
Returns:
Type
HttpServerFileUpload

fetch(amount) → {HttpServerFileUpload}

Parameters:
Name Type Description
amount number
Source:
Returns:
Type
HttpServerFileUpload

file() → {AsyncFile}

Source:
Returns:
the async uploaded file when HttpServerFileUpload#streamToFileSystem has been used
Type
AsyncFile

filename() → {string}

Source:
Returns:
the filename which was used when upload the file.
Type
string

handler(handler) → {HttpServerFileUpload}

Parameters:
Name Type Description
handler function
Source:
Returns:
Type
HttpServerFileUpload

isSizeAvailable() → {boolean}

Source:
Returns:
true if the size of the upload can be retrieved via HttpServerFileUpload#size.
Type
boolean

name() → {string}

Source:
Returns:
the name of the attribute
Type
string

pause() → {HttpServerFileUpload}

Source:
Returns:
Type
HttpServerFileUpload

pipe() → {Pipe}

Pause this stream and return a to transfer the elements of this stream to a destination .

The stream will be resumed when the pipe will be wired to a WriteStream.

Source:
Returns:
a pipe
Type
Pipe

pipeTo(dst, handler)

Pipe this ReadStream to the WriteStream.

Elements emitted by this stream will be written to the write stream until this stream ends or fails.

Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

Parameters:
Name Type Description
dst WriteStream the destination write stream
handler function
Source:

resume() → {HttpServerFileUpload}

Source:
Returns:
Type
HttpServerFileUpload

size() → {number}

The size of the upload may not be available until it is all read. Check HttpServerFileUpload#isSizeAvailable to determine this
Source:
Returns:
the size of the upload (in bytes)
Type
number

streamToFileSystem(filename) → {HttpServerFileUpload}

Stream the content of this upload to the given file on storage.
Parameters:
Name Type Description
filename string the name of the file
Source:
Returns:
Type
HttpServerFileUpload