-
Notifications
You must be signed in to change notification settings - Fork 511
File Input Fields Not Supported #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I also ran into this issue and implemented a very similar fix. It would be nice to see it included. You are right about the old browsers issue I think this would need to be addressed before this would be included. |
Unfortunately the only solution for old browsers is to create iFrames, there are existing solutions for rails 3.0+ but they're all pretty ugly. |
I think you might be right. Would love to see this included. |
I would leave this outside |
I ran into a situation where I wanted to be able to add
data-remote="true"
to a file input field. Turns out this doesn't work by default.I made it work, here's a link to the gist: https://gist.github.com/zakcrawford/b05b1399208fcb257ff9
This will only work in browsers that support
FormData();
(IE 10+, modern version of gecko and webkit)
Not sure if this is something that people are interested in, but if someone wants to create a way to do this that won't break in old browsers feel free to use my code as a starting point. The current test suite passed with my change, but I did not add any new tests.
The text was updated successfully, but these errors were encountered: