I've spent the last few days trying to figure this out. I have my own
Filereference class I use with PHP. But I'm trying to use it with
Rails and can't seem to get it to work. I even downloaded some samples
online and can't get those to work (http://blog.vixiom.com/2006/09/08/
multiple-file-upload-with-flash-and-ruby-on-rails/).

Basically my rails is something like this:

                data = params[:filedata]
                name = params[:Filename]

                directory = "public/data"

                path = File.join(directory, name)
                File.open(path, 'wb') do |file|
                        file.puts data.read
                  end

And when I use filereference and upload it in flash I get an
httpError: 422
I get this both in mine and the example's file.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to