Embryo/Http/Factory/UploadedFileFactory.php
public function createUploadedFile(
            StreamInterface $file, 
            int $size = null, 
            int $error = \UPLOAD_ERR_OK, 
            string $clientFilename = null, 
            string $clientMediaType = null
        ): UploadedFileInterface
        {
            if (!$file->isReadable()) {
                throw new \InvalidArgumentException('Temporany resource must be readable');
            }
            $size = (is_null($size)) ? $file->getSize() : $size;
            return new UploadedFile($file, $size, $error, $clientFilename, $clientMediaType); 
        }
public function createUploadedFile(
            StreamInterface $file, 
            int $size = null, 
            int $error = \UPLOAD_ERR_OK, 
            string $clientFilename = null, 
            string $clientMediaType = null
        ): UploadedFileInterface
        {
            if (!$file->isReadable()) {
                throw new \InvalidArgumentException('Temporany resource must be readable');
            }
            $size = (is_null($size)) ? $file->getSize() : $size;
            return new UploadedFile($file, $size, $error, $clientFilename, $clientMediaType); 
        }
public function createUploadedFile ( StreamInterface $ file , int $ size = null , int $ error = \ UPLOAD_ERR_OK , string $ clientFilename = null , string $ clientMediaType = null ) : UploadedFileInterface { if ( ! $ file -> isReadable ( ) ) { throw new \ InvalidArgumentException ( 'Temporany resource must be readable' ) ; } $ size = ( is_null ( $ size ) ) ? $ file -> getSize ( ) : $ size ; return new UploadedFile ( $ file , $ size , $ error , $ clientFilename , $ clientMediaType ) ; }
Creates a new uploaded file.

If a string is used to create the file, a temporary resource will be
created with the content of the string.

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

@param StreamInterface $file
@param int|null $size
@param int $error
@param string|null $clientFilename
@param string|null $clientMediaType
@return UploadedFileInterface
@throws InvalidArgumentException
Creates a new uploaded file .