You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My environment [Svelte] --FormData submit--> [SvelteKit Endpoint] --call for save file --> [Rails]
Describe the issue
I uploaded the file and submitted the form to the SvelteKit Endpoint. Then I passed FormData from SvelteKit to Rails by Axios get error "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream"
Example Code
Code snippet to illustrate your question
[svelte]<form
on:submitmethod="post"enctype="multipart/form-data"action="/api/reports"><Fileuploadname="report[thumbnail]"size="sm"accept="image/png, image/jpeg"/></form>[sveltekitendpoint]exportconstPOST: RequestHandler=async({ request, locals })=>{constform=awaitrequest.formData();// get formDataconstresponse=awaitaxios.post(`${url}`,data)// send form data};
My environment
[Svelte] --FormData submit--> [SvelteKit Endpoint] --call for save file --> [Rails]
Describe the issue
I uploaded the file and submitted the form to the SvelteKit Endpoint. Then I passed FormData from SvelteKit to Rails by Axios get error "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream"
Example Code
Code snippet to illustrate your question
Expected behavior, if applicable
I think can send FormData value to Rails server
Environment
"axios": "^0.27.2",
"@sveltejs/adapter-node": "1.0.0-next.88",
"@sveltejs/kit": "next",
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: