Skip to content
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

How can i get the return from +server? #20

Open
bbauti opened this issue Jul 2, 2023 · 1 comment
Open

How can i get the return from +server? #20

bbauti opened this issue Jul 2, 2023 · 1 comment

Comments

@bbauti
Copy link

bbauti commented Jul 2, 2023

Hi! when i submit a file, i want to get, for example, the string 'hey' from the return { text: 'hey'}; return from the +page.server.js in svelte.
But i dont know how can i do that, with vanilla forms i got it with
$: text= form?.text;
But with filepond it wont work.

@Randomblock1
Copy link

This has nothing to do with the plugin itself. You should ask this question on StackOverflow if you need extra help. But here's how you use POST data in SvelteKit:

https://kit.svelte.dev/docs/form-actions#anatomy-of-an-action

The reason why the thing you did worked was because it directly got the raw data right from the form on the client, whereas you probably want to send it and get server-processed data back using a POST request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants