smajti1 / laravel-wizard

Wizard component for laravel
MIT License
41 stars 16 forks source link

Upload file: Serialization of 'Illuminate\Http\UploadedFile' is not allowed #4

Open d4Mn3d opened 4 years ago

d4Mn3d commented 4 years ago

Exception in vendor/laravel/framework/src/Illuminate/Session/Store.php:129 (laravel 5.8)

I upload file in the request then i store it with $document = $request->document->storeAs('test/', $documentRenamed); The exception appears when I pass the $request to $this->saveProgress($request);

smajti1 commented 4 years ago

Hi @d4Mn3d, could you paste sample code that causes this error here or add more information about this error?

ghost commented 4 years ago

@smajti1 This will occurs when you have UploadedFile as parameters inside Request Object because Session will serialize all Request data and won't be able to serialize UploadedFile instance