Are Filepond IDs lost during authenticating process? #39
-
Hello 👋 I'm creating a Laravel 10 application where a guest uploads pictures through the server endpoint which is working. Nevertheless, when the user logs in (the page is not refreshed) the restoring point (which also works as guest) can no longer retrieve files from IDs : filepond models are null. Is it a normal behaviour? Thank you for reading me! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
@ludoguenet can you please elaborate a bit. Or share the problem code for checking. |
Beta Was this translation helpful? Give feedback.
-
Certainly! I use Vue Single File Components to handle front-end logic. I created a multi-step form that retains Filepond file IDs throughout the process. There's a specific step where users can submit photos, and I followed the documentation to set it up correctly. At the end of the process, I use However, I noticed that when users log in (or register and then log in), the file IDs are correctly preserved, but the pictures that should be retrieved when returning to the "photos" step are missing. The restore endpoints, which should return 200, instead return 500 with the following error message: TypeError: RahulHaque\Filepond\AbstractFilepond::createFileObject(): Argument #1 ($filepond) must be of type RahulHaque\Filepond\Models\Filepond, null given. This error occurs in ..../vendor/rahulhaque/laravel-filepond/src/AbstractFilepond.php on line 161. Many thanks for taking the time to assist me! |
Beta Was this translation helpful? Give feedback.
-
@ludoguenet thanks for the explanation. I believe you're talking about filepond's Thank you for using my package. |
Beta Was this translation helpful? Give feedback.
-
It works like a charm! :) |
Beta Was this translation helpful? Give feedback.
@ludoguenet thanks for opening the discussion and pointing out a real world scenario for my package. I've released a new version v1.10.10 with the option to force skip ownership check for special cases like yours. Update to the latest release get the file like this in your
restore
endpoint logic -Let me know of the result after the test.