Hi everyone, I finally uploaded files in RoR. Now I want to download it back trough the browser. This is what I get:
Routing Error
No route matches "/uploaded_files/dr_2.pdf" with {:method=>:get}
What can I do?
Regards,
Hi everyone, I finally uploaded files in RoR. Now I want to download it back trough the browser. This is what I get:
No route matches "/uploaded_files/dr_2.pdf" with {:method=>:get}
What can I do?
Regards,
Are you able to view the file if you go to yourdomain.com/ uploaded_files/dr_2.pdf ? That's the first thing to check - is it really there? If you're trying to get it, it sould live in RAILS_ROOT/ public/uploaded_files, I believe. It seems like a simple <%= link_to 'filename', '/uploaded_files/filename' %> should work.
-Kyle
That’s exactly what I am doing. But it does not work. The file is really there RAIS_ROOT/uploaded_files/dr_2.pdf
The index view is in https://disciplinas.dcc.ufba.br/svn/MATA63/2008.1/equipe5/trunk/app/views/projects/index.html.erb
The whole project is in https://disciplinas.dcc.ufba.br/svn/MATA63/2008.1/equipe5/trunk
Thanks
That's exactly what I am doing. But it does not work. The file is
really there RAIS_ROOT/uploaded_files/dr_2.pdf
Reread what kyle said: /uploaded_files/filename maps to RAILS_ROOT/ public/uploaded_files/filename.
Fred
Thanks guys! It worked. Sorry for my mistake.
Bruno