hi - i have a URL of an image (on cloud storage) and I want to send the file from a request. I do not want to redirect because I want to conceal the cloud URL. So I want to do something like: send_file "http://www....." but it cannot find the file: Cannot read file http://... but, the url is valid, I can see the file no problem. Is there a way to send a file from an external source? I want to avoid downloading the file to my server then resending it to the client. Thanks for any help, Dino -- 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.
dino d. wrote:> send_file "http://www....." > > but it cannot find the file: > > Cannot read file http://... > > but, the url is valid, I can see the file no problem. Is there a way > to send a file from an external source? I want to avoid downloading > the file to my server then resending it to the client.If the file already has a URL then you don''t need send_file. Just point the client''s browser at it. -- 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.
thanks for the response. you''ll notice i posted in the original "because I want to conceal the cloud URL" On Jul 8, 3:18 pm, Robert Walker <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> dino d. wrote: > > send_file "http://www....." > > > but it cannot find the file: > > > Cannot read file http://... > > > but, the url is valid, I can see the file no problem. Is there a way > > to send a file from an external source? I want to avoid downloading > > the file to my server then resending it to the client. > > If the file already has a URL then you don''t need send_file. Just point > the client''s browser at it. > -- > Posted viahttp://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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jul 8, 8:33 pm, "dino d." <dinodorr...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> thanks for the response. you''ll notice i posted in the original > "because I want to > conceal the cloud URL" >send_file can''t do that. I suppose you could write a small rails metal or embedded Sinatra app that streamed the file to them. You might also be able to use something like nginx''s x-accel-redirect to proxy them to the URL Fred> On Jul 8, 3:18 pm, Robert Walker <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > > > dino d. wrote: > > > send_file "http://www....." > > > > but it cannot find the file: > > > > Cannot read file http://... > > > > but, the url is valid, I can see the file no problem. Is there a way > > > to send a file from an external source? I want to avoid downloading > > > the file to my server then resending it to the client. > > > If the file already has a URL then you don''t need send_file. Just point > > the client''s browser at it. > > -- > > Posted viahttp://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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.