I am getting files uploaded and into a directory inside RAILS_ROOT called docstore. I want to provide a Download link to http://localhost:3000/docstore/7/some_file.ext The message I get is Recognition failed for "/docstore/7/Accounting_Entries.xls" Is this a routing issue? Routing is an area I have never really got the hang of. How do I overcome this? All I want is that when the user clicks on the Download link, he should be able to download the xls or whatever document is being pointed to. Regards, Rajesh --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
K. Rajesh wrote:> I am getting files uploaded and into a directory inside RAILS_ROOT > called docstore. I want to provide a Download link to > http://localhost:3000/docstore/7/some_file.ext > > The message I get is > Recognition failed for "/docstore/7/Accounting_Entries.xls" > > Is this a routing issue? Routing is an area I have never really got > the hang of. How do I overcome this? All I want is that when the user > clicks on the Download link, he should be able to download the xls or > whatever document is being pointed to. > > Regards, > RajeshIt might not work because docstore is in your RAILS_ROOT which is not accessible to the the web server. You would have to put docstore in RAILS_ROOT/public which would not be a good idea. Take a look at this site[1], it talks about how to set up file downloads. Nelson [1] http://www.recentrambles.com/pragmatic/view/62 --- Basedex - A Collaborative Index to organize and collect everything related to Ruby on Rails http://blazingrails.basedex.com/index/8 -- 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-/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 Nelson... I went through the link and I dont see any probs making it work. For sake of completion, I''ll post actual results in here tomorrow. Rajesh On Mar 16, 12:33 am, Nelson Hsu <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> K. Rajesh wrote: > > I am getting files uploaded and into a directory inside RAILS_ROOT > > called docstore. I want to provide a Download link to > >http://localhost:3000/docstore/7/some_file.ext > > > The message I get is > > Recognition failed for "/docstore/7/Accounting_Entries.xls" > > > Is this a routing issue? Routing is an area I have never really got > > the hang of. How do I overcome this? All I want is that when the user > > clicks on the Download link, he should be able to download the xls or > > whatever document is being pointed to. > > > Regards, > > Rajesh > > It might not work because docstore is in your RAILS_ROOT which is not > accessible to the the web server. You would have to put docstore in > RAILS_ROOT/public which would not be a good idea. Take a look at this > site[1], it talks about how to set up file downloads. > > Nelson > > [1]http://www.recentrambles.com/pragmatic/view/62 > > --- > Basedex - A Collaborative Index to organize and collect everything > related to Ruby on Railshttp://blazingrails.basedex.com/index/8 > > -- > 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-/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 -~----------~----~----~----~------~----~------~--~---