My problem is I am getting upload error when I try to upload a big image. (Greater than 2MB).
My upload size limit in php.ini is 40MB and I still get the following error:
development.ERROR: exception 'Exception' with message Serialization of Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Session/Store.php:212
Stack trace:
#0 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Session/Store.php(212): serialize(Array)
#1 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(126): Illuminate\Session\Store->save()
#2 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(79): Illuminate\Session\Middleware->closeSession(Object(Illuminate\Session\Store))
#3 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#4 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#5 /var/www/laravel/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#6 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(606): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#7 /var/www/laravel/public/index.php(61): Illuminate\Foundation\Application->run()
#8 {main} [] []
Why do I get the error?
How are you trying to upload a file ? With native laravel upload functions of with bundle ? Permissions can be just one of the problems.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.