Forum: Ruby on Rails need help with approach for application backend

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ilja I. (Guest)
on 2007-03-03 12:41
(Received via mailing list)
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
2) 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

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.
This topic is locked and can not be replied to.