I am using form_remote_tag to upload a file, but it says …
undefined method `content_type’ for #String:0x477a930
what could be wrong when it works fine with form_for?
I am using form_remote_tag to upload a file, but it says …
undefined method `content_type’ for #String:0x477a930
what could be wrong when it works fine with form_for?
You can’t upload via XMLHTTPRequest. Javascript does not have
access to local files on your computer for security purposes.
Take a look at this post:
On Dec 31 2007, 3:57 am, “Vapor …” [email protected]
You can use an Iframe for stuff like this.
Assuming you’re already using attachment_fu, you also need to use
responds_to_parent to allow for remote uploading.
On Dec 31 2007, 9:57 pm, “Vapor …” [email protected]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs