Git Product home page Git Product logo

Comments (6)

mirfanalikhanprofessional avatar mirfanalikhanprofessional commented on May 24, 2024

ok, now I have edited the plugin code to generate the name attribute dynamically, but that particular input field data is not being sent to the server. So can anyone tell me, that what is the issue, I can shared the changes done in the plugin code also, just needed to modify few lines.

from file-upload-with-preview.

mirfanalikhanprofessional avatar mirfanalikhanprofessional commented on May 24, 2024

Any update or suggestion @johndatserakis, regarding this problem.

from file-upload-with-preview.

johndatserakis avatar johndatserakis commented on May 24, 2024

Hey there - yea I've seen this in the past and it indicates that you are not sending the data to the backend in a way that will work. You should not need to pass the name manually.

I answered a similar question here recently. I'm not sure what backend you're using, but something like FormData on the frontend should allow everything to be passed properly.

from file-upload-with-preview.

mirfanalikhanprofessional avatar mirfanalikhanprofessional commented on May 24, 2024

I am using the FormData via an AJAX call to submit the form, before changing the plugin code to add the name attribute the problem still persisted. When I checked the raw request data on backend, it could be seen that image was not present, so that's why I took the approach of adding the name attribute but still I was not able to receive the image file. By the way, the backend is based on Laravel.

from file-upload-with-preview.

johndatserakis avatar johndatserakis commented on May 24, 2024

Hmm, interesting. Sorry I don't have a better answer for you now - I will mark this as something to look into on my end. Maybe I could stand-up a little demo app with a backend showing this working from soup to nuts. I'm just super booked right now, so sorry for the delay.

from file-upload-with-preview.

johndatserakis avatar johndatserakis commented on May 24, 2024

Closing for now - as I mentioned, this is more for frontend image handling. Perhaps one day I'll do a whole demo with a backend, but I won't be getting to that unfortunately in the near future.

from file-upload-with-preview.

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.