Closed mangga88d closed 3 months ago
Okay, let's get the basics out of the way:
inertia-laravel
. That is the backend bridge of the Inertia project. This repo has nothing to do with the frontend elements like useForm
So, rather than be overly negative, here's some help:
form.product_images = productImages.value.push(file)
The JS push
function returns the new length of the array you've just pushed to (see: MDN Array.prototype.push). So here, you're just saving an integer to form.product_images
, not the files.
Push first, and then save productImages.value
to form.product_images
.
form.post
only takes two params, (1) route (2) navigation options object. You need your onSuccess
in the same object as preserveState
.
Both Vue and Inertia have Discord channels which will be a more appropriate venue for coding help in the future.
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
i am trying to store image to database, i encounter problem using inertia useForm. other things are fine for me for sending form. only file can not be send. any help would be good
![Uploading Screenshot at Mar 10 15-02-54.png…]()