Hey Guys,
I created a web site where I could upload videos, it''s built using RoR
and RESTful urls. Videos#create lets me upload videos.
Next, I created another app, which using activeresource to interact
with the first site. So, I want the user to upload a file to the
client app, which then posts it via activeresource to the server app.
In the client app I get the file, but then I try to do this:
video_file = File.open params[:clip][:file].local_path, "r"
clip = Clip.new(:name => params[:clip][:name],
:description => params[:clip][:description],
:file => video_file)
Clip is the ActiveResource object for the server. On the server
params[:clip][:file] comes out null.
Let me reply to the answers I expect to come up in advance:
1) No, I cannot have the client post directly to the server
2) I tried Base64 encoding the data and sending as a string, but it
takes incredibly long to convert and post 100 megs of video via
Base64. I figure if the user can send to the client in binary, then
the client should be able to send to the server the same way.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---