# Image Getter

**URL:** <https://www.ruby-forum.com/t/image-getter/90980>\
**Category:** Rails\
**Created:** [April 3, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/image-getter/90980 "2007-04-03T16:00:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [April 3, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/image-getter/90980/1 "2007-04-03T16:00:51Z")

</div>

Hi,

Im trying to create a feature in my rails project that handles a certain  
style of image request. My images could potentially be sotred anywhere  
on a local disk and hence will not have an application server behind  
them which rules out just storing the urls in the database and calling  
them.

so in theory a page could request an image file by referencing a the  
number 12345 . what it needs to do then is get this image from disk and  
return it to the rails project.

Is this possible in ruby on rails?

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [April 3, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/image-getter/90980/2 "2007-04-03T16:12:26Z")

</div>

Hi Chris,

Chris G. wrote:

> so in theory a page could request an image file  
> by referencing a the number 12345 . what it needs  
> to do then is get this image from disk and return it  
> to the rails project.
> 
> Is this possible in ruby on rails?

You can allow a visitor to upload files, but no web app can simply grab  
files off a visitor’s computer. If visitor uploads are what you’re  
looking  
for, see the file\_field or file\_field\_tag methods at  
[http://api.rubyonrails.org/](http://api.rubyonrails.org/)

hth,  
Bill

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [April 3, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/image-getter/90980/3 "2007-04-03T17:01:53Z")

</div>

Bill W. wrote:

> Hi Chris,
> 
> Chris G. wrote:
> 
> > so in theory a page could request an image file  
> > by referencing a the number 12345 . what it needs  
> > to do then is get this image from disk and return it  
> > to the rails project.
> > 
> > Is this possible in ruby on rails?
> 
> You can allow a visitor to upload files, but no web app can simply grab  
> files off a visitor’s computer. If visitor uploads are what you’re  
> looking  
> for, see the file\_field or file\_field\_tag methods at  
> [http://api.rubyonrails.org/](http://api.rubyonrails.org/)
> 
> hth,  
> Bill

Sorry i must have explained that badly.

Basically there are going to be thousands of images, so we dont want to  
be storing them within our rails /images directory for example and would  
rather have a section of disk space for that.
