vincent15000's avatar

Multipart limitations

Hello,

https://inertiajs.com/docs/v2/the-basics/file-uploads#multipart-limitations

Is this also possible with the form helper ?

form.post(`/users/${user.id}`, {
    _method: 'put',
});

Thanks for your help.

V

0 likes
5 replies
vincent15000's avatar

Lary's response seems to say that yes it's possible, but in practise, it doesn't work.

vincent15000's avatar

This works.

router.post(`/users/${user.id}`, {
	...form,
    _method: 'put',
});

But this doesn't work.

form.post(`/users/${user.id}`, {
    _method: 'put',
});

Why does the latter not work ? Something wrong in my code ? Or does it simply not work at all ?

martinbean's avatar

@vincent15000 What do you mean by “works” and “doesn’t work”?

We have no idea what data you’re sending, to where, what you expect to see, nor what you’re actually seeing.

1 like
vincent15000's avatar

@martinbean

Sorry I thought it was logical because of the multipart title of the post here.

With multipart/form-data, I send a file from a VueJS form to the backend.

Works means that the file is sent and received by the backend, doesn't work means that the file isn't sent and is not received by the backend.

Please or to participate in this conversation.