Framework: Calling getSize() method from UploadedFile gives an error

Created on 19 Aug 2016  路  3Comments  路  Source: laravel/framework

error1
error2

My php.ini settings are fine (post_max_size superior (50M) to max file upload size and memory limit superior to both of them)

Found nothing but this :
https://github.com/laravel/framework/issues/5221

When not using the move() function getSize() or putting it after the getSize() call works fine.

Any idea ?

php_version

Using Laravel v5.2.43

Most helpful comment

When you move the file the File is not in the previous path anymore so the getSize method access the old path call the size method before the move or store the size in a variable.

All 3 comments

When you move the file the File is not in the previous path anymore so the getSize method access the old path call the size method before the move or store the size in a variable.

I agree with @arasmit2453.

The error makes sense because you already moved the file as @arasmit2453 said. Closing the issue then :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PhiloNL picture PhiloNL  路  3Comments

JamborJan picture JamborJan  路  3Comments

RomainSauvaire picture RomainSauvaire  路  3Comments

shopblocks picture shopblocks  路  3Comments

felixsanz picture felixsanz  路  3Comments