image upload help
mangga88d opened this issue · 2 comments
Okay, let's get the basics out of the way:
- This is the repo for
inertia-laravel
. That is the backend bridge of the Inertia project. This repo has nothing to do with the frontend elements likeuseForm
- If you're having issues performing basic tasks in a project that has thousands of active users, 999,999 times out of a million, it's going to be a coding error on your part. GitHub issues are not the place to ask for coding assistance. They are for reporting issues with the code in the repo itself.
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.