rahulhaque / laravel-filepond

Use FilePond the Laravel way.
MIT License
185 stars 31 forks source link

Error in laravel 8 jetstream #18

Closed eskiesirius closed 2 years ago

eskiesirius commented 2 years ago

I got this error

Illuminate\Contracts\Encryption\DecryptException: The payload is invalid. in file D:\Software Projects\atc\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php on line 223

#0 D:\Software Projects\atc\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php(158): Illuminate\Encryption\Encrypter->getJsonPayload()
#1 D:\Software Projects\atc\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(261): Illuminate\Encryption\Encrypter->decrypt()
#2 D:\Software Projects\atc\vendor\rahulhaque\laravel-filepond\src\AbstractFilepond.php(153): Illuminate\Support\Facades\Facade::__callStatic()
#3 D:\Software Projects\atc\vendor\rahulhaque\laravel-filepond\src\AbstractFilepond.php(58): RahulHaque\Filepond\AbstractFilepond->decrypt()
#4 D:\Software Projects\atc\vendor\rahulhaque\laravel-filepond\src\Filepond.php(19): RahulHaque\Filepond\AbstractFilepond->setFieldValue()
#5 D:\Software Projects\atc\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(261): RahulHaque\Filepond\Filepond->field()

here is the snippet

Filepond::field($request->document)
            ->validate(['document' => 'required|file|image']);
rahulhaque commented 2 years ago

@eskiesirius are you using this in Livewire component?

eskiesirius commented 2 years ago

im using inertiajs.. not using any livewire components

rahulhaque commented 2 years ago

@eskiesirius make sure the value of your document variable from frontend is not empty. See if filepond input is updated with server returned value when you dropped the file. Inspect element the filepond. I haven't tried with inertiajs but should work fine for the backend.

rahulhaque commented 2 years ago

@eskiesirius I've added a Jetstream vue inertia example. See the readme.