# Need help with approach for application backend

**URL:** <https://www.ruby-forum.com/t/need-help-with-approach-for-application-backend/87523>\
**Category:** Rails\
**Created:** [March 3, 2007, 11:41am UTC](https://www.ruby-forum.com/t/need-help-with-approach-for-application-backend/87523 "2007-03-03T11:41:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ogurec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/71e660/32.png) [@ogurec](https://www.ruby-forum.com/u/ogurec)\
**Post date:** [March 3, 2007, 11:41am UTC](https://www.ruby-forum.com/t/need-help-with-approach-for-application-backend/87523/1 "2007-03-03T11:41:30Z")

</div>

Hi!  
At this time i work with backend for my application. In the backend i  
will provide for user the  
ability to create and edit documents which contains images. According  
to this goal i think about

1. what is a good way to implement images uploading to server  
according my needs (described below)
2. how to implement UI for this part of backend so that it was  
convenient for user to upload images and  
view/browse through previously uploaded images
3. how to implement images inserting into document (documents are  
created using some free wisiwig editor)

This image illustrates how can backend look to me  
[http://img455.imageshack.us/img455/5892/backendcb9.jpg](http://img455.imageshack.us/img455/5892/backendcb9.jpg)

Yesterday i tried the combination FileColumn + TinyMCE. I think, that  
images will be stored on server in place  
public/images/users/user\_id/image\_file1, image\_file2 … and so on, so  
that every user has its own folder with images.  
I’ve played with FileColumn, and got this: when i upload file, its  
stored in right place - public/images/users/user\_id/  
(for this i have to edit file\_column.rb),  
but when i upload next image, previous image is deleted. In sql table  
“documents” i have 2 columns, “image” and “image1”,  
so that there must be ability to store 2 images in user\_id folder, and  
the records in columns “image” and “image1”  
must point to these images (if i understand the concept of FileColumn  
right).

And the problem with TinyMCE - user must provide URL (http://) to  
image, user can’t point image “browse” way, as usual.  
Therefore in backend i need to show images full URL, so user can copy  
and paste it. This all seems to be a bad approach.

If you had similar goals and/or have experience how to achieve this, i  
appreciate if you share your knowledge or  
point me to article/design pattern related to my needs.

It would be good, if there is something like YUI , but which copes  
well with the backend tasks.
