# Best way of storing attachements/images

**URL:** <https://www.ruby-forum.com/t/best-way-of-storing-attachements-images/100017>\
**Category:** Ruby\
**Created:** [July 26, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/best-way-of-storing-attachements-images/100017 "2006-07-26T18:46:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 26, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/best-way-of-storing-attachements-images/100017/1 "2006-07-26T18:46:13Z")

</div>

I’m building a webshop and i’m stuck with a specific task. I’m using  
rails.

I have a form for adding a new product. In the form there’s a portion  
for image upload.  
I want to provide my client with a way of adding images to his product  
and returning to the same folder with the fields he’s filled in still  
filled in.

Form -\> Add image -\> Returns to the form displaying the images that  
will be added to this form.  
Form -\> Submit -\> Saves the product and the images.

I’ve looked at both file\_column and acts\_as\_attachement plugins but  
it’s the specific form re-view that I don’t know how to solve.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 26, 2006, 7:58pm UTC](https://www.ruby-forum.com/t/best-way-of-storing-attachements-images/100017/2 "2006-07-26T19:58:13Z")

</div>

I’m not sure if Iunderstood you correctly… anyway if what’s you’re  
trying to achieve is to upload images _without_ clearing/resetting the  
form via page reload, try using ajax to add images to the form (see  
e.g.  
[Peak Obsession](http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper.html)),  
and “normal way” to select one of them afterwards.

Maybe you’d ask directly on rails list  
([http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)) - they’ll  
probably know better.

J.
