Tyrel R.
2011-Jul-14 03:52 UTC
Trying to understand the ActionDispatch::Http::UploadedFile class
I am trying to incorporate audio and picture uploads into my app but I can''t find very much documentation on the ActionDispatch::Http::UploadedFile class and I don''t even know how to create an instance of it from a file in the console. I am trying to use the gstore gem to handle saving the files to google storage but all of the functions from this gem seem to need the file to be on your hard drive and I just want to feed it over virtually. I am pretty sure I can accomplish this if I can covert the ActionDispatch::Http::UploadedFile into a string but I don''t know what message to send to do that. Any help would be greatly appreciated, Thank you -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tyrel R.
2011-Jul-14 21:50 UTC
Re: Trying to understand the ActionDispatch::Http::UploadedFile class
I feel kind of stupid
ActionDispatch::Http::UploadedFile is basically a wrapper class for with
a @tmp_file member and one of its wrapper functions is
def path
@tmp_file.path
end
So for my problem
gs = GStor.new( #login_data )
gs.add_file_to_bucket( ''bucket'', ''name'',
@uploaded_file.path )
--
Posted via http://www.ruby-forum.com/.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.