mini\Http\Message\UploadedFile::getStream() Method

public

Signature

public function getStream(): Psr\Http\Message\StreamInterface

Returns

Psr\Http\Message\StreamInterface

Documentation

Retrieve a stream representing the uploaded file.

This method MUST return a StreamInterface instance, representing the uploaded file. The purpose of this method is to allow utilizing native PHP stream functionality to manipulate the file upload, such as stream_copy_to_stream() (though the result will need to be decorated in a native PHP stream wrapper to work with such functions).

If the moveTo() method has been called previously, this method MUST raise an exception.

Source

src/Http/Message/UploadedFileTrait.php:64-73