Coder Social home page Coder Social logo

Comments (4)

JangoSteve avatar JangoSteve commented on August 31, 2024

Not sure what you mean with this one. How are you adding data and files to .ajax(). You should just be using :remote => true in your rails form.

from remotipart.

fokcep avatar fokcep commented on August 31, 2024

I need to pass file to upload and other form data in .ajax request. It works quite well with just one file. Usually I just pass $("form").serialize but wiht .ajax it doesn't work

from remotipart.

btushinde avatar btushinde commented on August 31, 2024

@fokcep according to the jQuery API, file fields in a form will not be serialized.

http://api.jquery.com/serialize/

"Note: Only "successful controls" are serialized to the string. No submit button value is serialized since the form was not submitted using a button. For a form element's value to be included in the serialized string, the element must have a name attribute. Values from checkboxes and radio buttons (inputs of type "radio" or "checkbox") are included only if they are checked. Data from file select elements is not serialized."

from remotipart.

JangoSteve avatar JangoSteve commented on August 31, 2024

Thanks for following up on this @btushinde. I'm closing this for now, as it doesn't seem to be a remotipart issue. Let me know if I missed anything and need to reopen it.

from remotipart.

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.