-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Returning files from load function does not work #409
Comments
just saw the implementation of is there another way of sending files as initial values? my use case is a form that is submitted with some attachments, and then can be edited again. i can do this with an api route that i fetch from the client but i was hoping there was an "intended" (superforms-wise) way to do it. |
SvelteKit cannot serialize |
Description
I want to load some default data from a database to initially populate the form. This includes some files.
This seems to work server-side. However, the client does not receive the files. This is inside my load function:
On the client:
If I have more fields in my schema/initial data, those pass through just fine. There are no validation errors anywhere, but the files array never gets to the client.
If applicable, a MRE
Use this template project to create a minimal reproducible example that you can link to here: https://sveltelab.dev/github.com/ciscoheat/superforms-examples/tree/zod (right click to open in a new tab)
See the console logs in the repro. The file is validated fine in the server, but the client does not receive it.
https://www.sveltelab.dev/zqpke6y03pcgu3s
The text was updated successfully, but these errors were encountered: