\Psr\Http\MessageUploadedFileFactoryInterface

Summary

Methods
Constants
createUploadedFile()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

createUploadedFile()

createUploadedFile(\Psr\Http\Message\StreamInterface  $stream, int  $size = null, int  $error = UPLOAD_ERR_OK, string  $clientFilename = null, string  $clientMediaType = null) : \Psr\Http\Message\UploadedFileInterface

Create a new uploaded file.

If a size is not provided it will be determined by checking the size of the file.

Parameters

\Psr\Http\Message\StreamInterface $stream

Underlying stream representing the uploaded file content.

int $size

in bytes

int $error

PHP file upload error

string $clientFilename

Filename as provided by the client, if any.

string $clientMediaType

Media type as provided by the client, if any.

Throws

\InvalidArgumentException

If the file resource is not readable.

Returns

\Psr\Http\Message\UploadedFileInterface —