Skip to content

UploadedFile: getSize Example

Terry L edited this page Jun 20, 2020 · 2 revisions
Clone this wiki locally

Shieldon\Psr7\UploadedFile

getSize()

Retrieve the file size.

  • return int|null

Example:

$uploadedFile = new \Shieldon\Psr7\UploadedFile(
    '/tmp/php200A.tmp',
    'example1.jpg',
    'image/jpeg',
    100000,
    0
);

echo $uploadedFile->getSize();
// Outputs: 100000