Hi, This may not be a rails issue, if not apologies. I have an application which allows image downloads. The image is downloaded with the code: send_data(@wallpaper.image, :filename => @wallpaper.path, :type => @wallpaper.image_content_type, :disposition => "downloaded") However, Internet Explorer doesn''t download the image, it just displays it. I know can do the whole ''Right click and choose save as'' thing but I was wondering is there a method of avoiding this with rails. Thanks in advance, Keith --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 2/7/07, Keith Davey <keith.davey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > This may not be a rails issue, if not apologies. > > I have an application which allows image downloads. > > The image is downloaded with the code: > send_data(@wallpaper.image, > :filename => @ wallpaper.path, > :type => @wallpaper.image_content_type, > :disposition => "downloaded") > > However, Internet Explorer doesn''t download the image, it just displays it. > I know can do the > whole ''Right click and choose save as'' thing but I was wondering is there a > method of > avoiding this with rails. > > Thanks in advance, > > KeithKeith, Try it without setting the :disposition (which doesn''t appear to be a valid value). send_data(@wallpaper.image, :filename => @ wallpaper.path, :type => @wallpaper.image_content_type) -- Zack Chandler http://depixelate.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-/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 -~----------~----~----~----~------~----~------~--~---
Thanks Zack, Its working perfectly now. Not sure I picked up that :disposition value but it must have been in an example somewhere. Keith On 2/7/07, Zack Chandler <zackchandler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 2/7/07, Keith Davey <keith.davey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > > > > This may not be a rails issue, if not apologies. > > > > I have an application which allows image downloads. > > > > The image is downloaded with the code: > > send_data(@wallpaper.image, > > :filename => @ wallpaper.path, > > :type => @wallpaper.image_content_type, > > :disposition => "downloaded") > > > > However, Internet Explorer doesn''t download the image, it just displays > it. > > I know can do the > > whole ''Right click and choose save as'' thing but I was wondering is > there a > > method of > > avoiding this with rails. > > > > Thanks in advance, > > > > Keith > > Keith, > > Try it without setting the :disposition (which doesn''t appear to be a > valid value). > > send_data(@wallpaper.image, > :filename => @ wallpaper.path, > :type => @wallpaper.image_content_type) > > -- > Zack Chandler > http://depixelate.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-/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 -~----------~----~----~----~------~----~------~--~---