Coder Social home page Coder Social logo

image upload help about inertia-laravel HOT 2 CLOSED

mangga88d avatar mangga88d commented on July 2, 2024
image upload help

from inertia-laravel.

Comments (2)

craigrileyuk avatar craigrileyuk commented on July 2, 2024

Okay, let's get the basics out of the way:

  1. 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 like useForm
  2. 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.

from inertia-laravel.

driesvints avatar driesvints commented on July 2, 2024

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.

from inertia-laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.