# Not able to view the images after the upload

**URL:** <https://www.ruby-forum.com/t/not-able-to-view-the-images-after-the-upload/123377>\
**Category:** Rails\
**Created:** [December 17, 2007, 7:24am UTC](https://www.ruby-forum.com/t/not-able-to-view-the-images-after-the-upload/123377 "2007-12-17T07:24:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![koli](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@koli](https://www.ruby-forum.com/u/koli)\
**Post date:** [December 17, 2007, 7:24am UTC](https://www.ruby-forum.com/t/not-able-to-view-the-images-after-the-upload/123377/1 "2007-12-17T07:24:00Z")

</div>

hi,  
i have this problem where in i’m able to upload the images using  
file\_column  
to the server but i’m not able to view the images.i’m not able to see  
the images  
but then i’m able to view the image name when i click on my show action.  
can any one please help??

THIS IS MY LOG as to what happens when i do the image upload.

Processing UploadController#create (for 127.0.0.1 at 2007-12-17  
11:39:44) [POST]  
Session ID: f385bac4321f9e08c5b50f5ac2d345a6  
Parameters: {“commit”=\>“Create”, “iframe\_remote”=\>“true”,  
“action”=\>“create”, “controller”=\>“upload”,  
“entry”=\>{“lon”=\>“77.620006105957”, “name”=\>“hebbal”,  
“comments”=\>“test”, “image\_temp”=\>"", “image”=\>#StringIO:0xb74d72d8,  
“lat”=\>“13.0509805297852”}}  
Rendering upload/list.rjs  
Completed in 0.03459 (28 reqs/sec) | Rendering: 0.00003 (0%) | DB:  
0.00000 (0%) | 200 OK  
[http://mongrel\_cluster\_civic/civic/upload/create?iframe\_remote=true]

The image is shown as as STRINGIO insted of showing the image name.  
My Model is as below…

class Entry \< ActiveRecord::Base

require ‘remote\_uploads.rb’

```
    file_column :image, :magick => {
  :versions => { "thumb" => "50x50" }
}

```

def self.content\_columns  
filter = %w(created\_on updated\_on lat lon image lock\_version)  
super.reject {|c| filter.include? c.name}  
end

end

Thanks…

---

<div class="post-metadata">

**Author:** ![koli](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@koli](https://www.ruby-forum.com/u/koli)\
**Post date:** [December 17, 2007, 11:36am UTC](https://www.ruby-forum.com/t/not-able-to-view-the-images-after-the-upload/123377/2 "2007-12-17T11:36:50Z")

</div>

> The image is shown as as STRINGIO insted of showing the image name.  
> My Model is as below…
> 
> class Entry \< ActiveRecord::Base
> 
> require ‘remote\_uploads.rb’
> 
> ```
> file_column :image, :magick => {
> :versions => { "thumb" => "50x50" }
> }
> 
> ```
> 
> def self.content\_columns  
> filter = %w(created\_on updated\_on lat lon image lock\_version)  
> super.reject {|c| filter.include? c.name}  
> end
> 
> end
> 
> Thanks…

can anybody also let me know how to upload images to a different  
directory  
rather than /public,  
for ex:RAILS\_ROOT/

---

<div class="post-metadata">

**Author:** ![koli](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@koli](https://www.ruby-forum.com/u/koli)\
**Post date:** [December 17, 2007, 12:00pm UTC](https://www.ruby-forum.com/t/not-able-to-view-the-images-after-the-upload/123377/3 "2007-12-17T12:00:53Z")

</div>

I used to use file\_column a lot before til I started having questions  
like yours. Everyone recommended attachment\_fu, and so do I (but it’s  
a bit harder to learn). I suggest you finish your project with  
attachment\_fu.

On Dec 17, 2007 6:36 PM, Koli K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > ```
> > }
> > 
> > ```
> > 
> > Thanks…

–  
Ramon T.

---

<div class="post-metadata">

**Author:** ![koli](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@koli](https://www.ruby-forum.com/u/koli)\
**Post date:** [December 17, 2007, 12:45pm UTC](https://www.ruby-forum.com/t/not-able-to-view-the-images-after-the-upload/123377/4 "2007-12-17T12:45:04Z")

</div>

Ramon T. wrote:

> I used to use file\_column a lot before til I started having questions  
> like yours. Everyone recommended attachment\_fu, and so do I (but it’s  
> a bit harder to learn). I suggest you finish your project with  
> attachment\_fu.
> 
> On Dec 17, 2007 6:36 PM, Koli K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > > ```
> > > }
> > > 
> > > ```
> > > 
> > > Thanks…
> 
> –  
> Ramon T.

i would like to do it with file\_column as i have completed everything  
else.  
The image is displayed when it is run in the production mode in my local  
but the same piece of code is not working on the server.
