sveltekit-superforms icon indicating copy to clipboard operation
sveltekit-superforms copied to clipboard

Putting dataType: 'json' to enable nested data in a enctype="multipart/form-data" always return value from input type="file" undefined

Open TheBous opened this issue 7 months ago • 2 comments

In my SvelteKit project, I'm using SvelteKit-Superforms to handle form submissions. The form includes a nested data structure and an image upload field, with enctype="multipart/form-data" set to handle file uploads. However, when I set dataType: 'json', the image field always returns undefined and the image never reaches the server. This issue occurs despite the correct configuration of the form and the expected behavior of handling multipart data.

TheBous avatar Jul 19 '24 10:07 TheBous