I''m developing a site that will need to display images that will be stored in a location outside the site. What would be the easiest way to do this? The site will be running on a linux machine. Thanks, Will --------------------------------- You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
<a href="http://www.some-external-site.com/images/some-img.jpg"> - BD On Jun 18, 7:27 am, Will Gant <williamwg...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> I''m developing a site that will need to display images that will be stored in a location outside the site. What would be the easiest way to do this? The site will be running on a linux machine. > > Thanks, > Will > > --------------------------------- > You snooze, you lose. Get messages ASAP with AutoCheck > in the all-new Yahoo! Mail Beta.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Actually, the images in question need to be stored in the filesystem outside the site, but I''d rather not expose them to the web. The flow of operations I''d like to have is as follows: 1) User requests an image, sending the image id. Under the hood, it hits a controller method, so the request would be something like (http://mysite.com/images/getbinary/152). 2) My system picks up the id from the request and locates the image on disk 3) Some component of rails grabs the image from disk and pushes down to the client. For instance, in .NET I''d probably create an Image object, load it from the image on disk, then serialize it into the response stream. That way, the image would only be available to the user through the site. Brian Dainton <brian.dainton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: - BD On Jun 18, 7:27 am, Will Gant wrote:> I''m developing a site that will need to display images that will be stored in a location outside the site. What would be the easiest way to do this? The site will be running on a linux machine. > > Thanks, > Will > > --------------------------------- > You snooze, you lose. Get messages ASAP with AutoCheck > in the all-new Yahoo! Mail Beta.--------------------------------- Get the Yahoo! toolbar and be alerted to new email wherever you''re surfing. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Look at send_file() send_file( ''/path/to/some/image_file.gif'', :disposition => ''inline'', :type => ''image/gif'', :stream => false, :filename => ''private_file.gif'' ) -Rob On Jun 18, 2007, at 1:52 PM, Will Gant wrote:> Actually, the images in question need to be stored in the > filesystem outside the site, but I''d rather not expose them to the > web. The flow of operations I''d like to have is as follows: > 1) User requests an image, sending the image id. Under the hood, it > hits a controller method, so the request would be something like > (http://mysite.com/images/getbinary/152). > 2) My system picks up the id from the request and locates the image > on disk > 3) Some component of rails grabs the image from disk and pushes > down to the client. > > For instance, in .NET I''d probably create an Image object, load it > from the image on disk, then serialize it into the response stream. > That way, the image would only be available to the user through the > site. > > Brian Dainton <brian.dainton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > - BD > > On Jun 18, 7:27 am, Will Gant wrote: > > I''m developing a site that will need to display images that will > be stored in a location outside the site. What would be the easiest > way to do this? The site will be running on a linux machine. > > > > Thanks, > > Will > > > > --------------------------------- > > You snooze, you lose. Get messages ASAP with AutoCheck > > in the all-new Yahoo! Mail Beta. > > > Get the Yahoo! toolbar and be alerted to new email wherever you''re > surfing. > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
That''s exactly what I needed. Thank you! Rob Biedenharn <Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org> wrote: Look at send_file() send_file( ''/path/to/some/image_file.gif'', :disposition => ''inline'', :type => ''image/gif'', :stream => false, :filename => ''private_file.gif'' ) -Rob On Jun 18, 2007, at 1:52 PM, Will Gant wrote: Actually, the images in question need to be stored in the filesystem outside the site, but I''d rather not expose them to the web. The flow of operations I''d like to have is as follows: 1) User requests an image, sending the image id. Under the hood, it hits a controller method, so the request would be something like (http://mysite.com/images/getbinary/152). 2) My system picks up the id from the request and locates the image on disk 3) Some component of rails grabs the image from disk and pushes down to the client. For instance, in .NET I''d probably create an Image object, load it from the image on disk, then serialize it into the response stream. That way, the image would only be available to the user through the site. Brian Dainton <brian.dainton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: - BD On Jun 18, 7:27 am, Will Gant wrote:> I''m developing a site that will need to display images that will be stored in a location outside the site. What would be the easiest way to do this? The site will be running on a linux machine. > > Thanks, > Will > > --------------------------------- > You snooze, you lose. Get messages ASAP with AutoCheck > in the all-new Yahoo! Mail Beta.--------------------------------- Get the Yahoo! toolbar and be alerted to new email wherever you''re surfing. --------------------------------- Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---