Berin L. wrote:
File_column plugin saves uploaded files to
“public/model/image/model_id/filename”, if i understand it correctly.
Does it mean that it creates new folder for every image?
When you consider that the file_upload plugin allows you to save
multiple versions of the same file for each ID, that works.
I have product (model) that has_many images (model). Is it possible to
use (or modify) this plugin that it would save my images to different
folder, so the id of the model_id part would be id of the product that
the image belongs_to, not the id of the image?
Honestly, I started playing with the file_upload plugin and then
realized that I wanted my images stored in the database–not the
filesystem. Main reason was because I wanted to make it easier to
distribute the app. When you save the images to the filesystem, you
have to set up your web app in a SAN if you want to distribute the
images and such across many servers scalably. In the database, you make
it an issue of scaling the database. More ISPs have experience doing
that than setting up SANs for your application.
I found it wasn’t hard to do, and if you are interested I’ll share how I
did it (Rails 1.0, MySQL 5)
would you please show me how to do that? Thanks!