We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25a62e0 commit 0a8e213Copy full SHA for 0a8e213
src/Psr17/UploadedFileFactory.php
@@ -39,7 +39,7 @@ final class UploadedFileFactory implements UploadedFileFactoryInterface{
39
* @throws \InvalidArgumentException If the file resource is not readable.
40
*/
41
public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null):UploadedFileInterface{
42
- return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
+ return new UploadedFile($stream, $size ?? $stream->getSize(), $error, $clientFilename, $clientMediaType);
43
}
44
45
0 commit comments