File_column save directory without object id dirname

Has anyone used file_column for more ftp type file management? ie, where
the files are all placed in one directory WITHOUT the object id number
on the preceding directory?

EG

This

file/filename1.ext
file/filename2.ext

rather than

upload/1/filename1.ext
upload/2/filename2.ext

I ask this because we are using FCKeditor which allows users to add
files from file/. Having multiple subdirectories under this will be
messy. But we also want the users to be able to manage the files which
have been uploaded from an admin GUI, and are not sure how file_column
will find each item if it is not under the object_id#/ directory.

Or, does acts_as_attachment offer this functionality?

I had similar problem - i needed to store images relative to user id,
e.g.
public/images/users/user_id/image_file_1, image_file_2 and so on.

Maybe i did somthing wrong with setting :storage_dir option in my
model, but this works for me only when i
edited file_column.rb

options[:store_dir] ||= File.join(options[:root_path], “users”)

DEFAULT_OPTIONS = {
:root_path => File.join(RAILS_ROOT, “public”, “images”),

}
3)
options[:base_url] ||= options[:web_root] + “users”

but now i have other problem - every time the user creates a new post
and uploads image, the image previously stored in
his folder, will be deleted

On Sep 18 2006, 5:46 am, Xia __ [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs