HttpServerFileUpload

Represents an file upload from an HTML FORM.

package

Default

Methods

__construct

__construct() 

charset

charset() : string

Response

string

the charset for the upload

contentTransferEncoding

contentTransferEncoding() : string

Response

string

the contentTransferEncoding for the upload

contentType

contentType() : string

Response

string

the content type for the upload

endHandler

endHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

exceptionHandler

exceptionHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

fetch

fetch( $arg0) : $this

Arguments

$arg0

integer

Response

$this

file

file() : \io\vertx\jphp\core\file\AsyncFile

Response

\io\vertx\jphp\core\file\AsyncFile

the async uploaded file when {@link #streamToFileSystem} has been used

filename

filename() : string

Response

string

the filename which was used when upload the file.

handler

handler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

isSizeAvailable

isSizeAvailable() : boolean

Response

boolean

{@code true} if the size of the upload can be retrieved via {@link #size()}.

name

name() : string

Response

string

the name of the attribute

pause

pause() : $this

Response

$this

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

pipe() : \io\vertx\jphp\core\http\Pipe<Buffer>

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

Response

\io\vertx\jphp\core\http\Pipe

a pipe

Like @see \io\vertx\jphp\core\streams\ReadStream::pipeTo but with no completion handler.

pipeTo( $arg0,  $arg1 = null) : void

param $dst [WriteStream] pipeTo($dst)

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. param $dst [WriteStream] the destination write stream param $handler [callable] pipeTo($dst, $handler)

Arguments

$arg0

WriteStream

$arg1

callable

resume

resume() : $this

Response

$this

The size of the upload may not be available until it is all read.

size() : integer

Check @see \io\vertx\jphp\core\http\HttpServerFileUpload::isSizeAvailable to determine this

Response

integer

the size of the upload (in bytes)

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

streamToFileSystem( $arg0) : $this

Arguments

$arg0

string

Response

$this