Undefined property: IlluminateHttpUploadedFile::$name after image upload

  file-upload, laravel, php

I am trying to get the exact uploaded image size by using getimagesize() php helper on Laravel 7. But i get an error

ErrorException: Undefined property: IlluminateHttpUploadedFile::$name on the line where the code is:

if($request->file('image') != null){
        $upload = $request->file('image');
        $sourceProperties = getimagesize($upload->name);

Please help understand the issues since it only occurs on the Debian server and not locally… It works fine on local

Source: Laravel

Leave a Reply