Since Ajax doesn’t support file uploads, I’m using “IFRAME remoting
made easy” (http://sean.treadway.info/). I’m saving a file to the
filesystem, and then trying to put it in to the database when I do the
final submit with ajax. I thought picking the file up and putting it
in the db would be as easy as having:
"@image.data = IO.read(“path_to_file”) in the create method in the
controller. But I get: “undefined method `read’ for #”
What’s the right way of doing this?