# Accessing external file system files

**URL:** <https://www.ruby-forum.com/t/accessing-external-file-system-files/88932>\
**Category:** Rails\
**Created:** [March 15, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/accessing-external-file-system-files/88932 "2007-03-15T18:20:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KSRajesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Post date:** [March 15, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/accessing-external-file-system-files/88932/1 "2007-03-15T18:20:01Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![KSRajesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Post date:** [March 15, 2007, 8:33pm UTC](https://www.ruby-forum.com/t/accessing-external-file-system-files/88932/2 "2007-03-15T20:33:48Z")

</div>

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](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](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](http://blazingrails.basedex.com/index/8)

---

<div class="post-metadata">

**Author:** ![KSRajesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Post date:** [March 15, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/accessing-external-file-system-files/88932/3 "2007-03-15T21:14:29Z")

</div>

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 H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
