getSize(); if ($size === null) { throw new \InvalidArgumentException('Stream size could not be determined.', 1566823423); } } return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); } }