Hello champs, Currently i have given a link to my document as like:- ''/controller/action/holidaylist.xls'' and i have placed this file in my own created directory ''ABC'' at RAILS_ROOT only. And in my controller, i have written like:- send_data(File.read("#{RAILS_ROOT}/ABC/" + file_name), :file_name => file_name :disposition => "inline") Now whenever i clicked it, my firefox browser prompts a window to open it. That is something i do not want. I want to view it in browser only.. Can someone light me some direction over it so that i can move forward .. ? -- 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.
On 25 March 2010 13:17, Hemant Bhargava <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello champs, > > Currently i have given a link to my document as like:- > ''/controller/action/holidaylist.xls'' and i have placed this file in my > own created directory ''ABC'' at RAILS_ROOT only. > > And in my controller, i have written like:- > > send_data(File.read("#{RAILS_ROOT}/ABC/" + file_name), > :file_name => file_name > :disposition => "inline") > > > Now whenever i clicked it, my firefox browser prompts a window to open > it. That is something i do not want. I want to view it in browser only.. > > Can someone light me some direction over it so that i can move forwardIn the prompt window in FF there should be a checkbox ''Do this automatically for files like this from now on'' or something similar. Check that and the file should open without prompting. Colin> .. ? > -- > 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@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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.
Colin Law wrote:> On 25 March 2010 13:17, Hemant Bhargava <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> � � � � � �:disposition => "inline")Hello colin, Thanks for a quick reply. But i do not want this to be happen in my firefox only. I want this to be happen in every application which are using my application.. Hope you got me right.. And yes i got to know that there are so many ways with which you can configure this on your machine only. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 25 March 2010 15:32, Hemant Bhargava <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote: >> On 25 March 2010 13:17, Hemant Bhargava <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> � � � � � �:disposition => "inline") > > Hello colin, > > Thanks for a quick reply. But i do not want this to be happen in my > firefox only. I want this to be happen in every application which are > using my application.. > > Hope you got me right.. > And yes i got to know that there are so many ways with which you can > configure this on your machine only.As far as I know this cannot be done. All you can do is to send the pdf file. It is up to the browser to decide what to do with it. I may be wrong though. Colin -- 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.
Colin is right. After googling it ( http://www.google.com/search?q=firefox+view+pdf+in+browser) found the following page: http://support.mozilla.com/en-US/kb/opening+PDF+files+within+Firefox . /Lasse 2010/3/25 Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>> On 25 March 2010 15:32, Hemant Bhargava <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > Colin Law wrote: > >> On 25 March 2010 13:17, Hemant Bhargava <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >>> � � � � � �:disposition => "inline") > > > > Hello colin, > > > > Thanks for a quick reply. But i do not want this to be happen in my > > firefox only. I want this to be happen in every application which are > > using my application.. > > > > Hope you got me right.. > > And yes i got to know that there are so many ways with which you can > > configure this on your machine only. > > As far as I know this cannot be done. All you can do is to send the > pdf file. It is up to the browser to decide what to do with it. I > may be wrong though. > > Colin > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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.