file_column
This article or section has multiple issues. Please help improve the article or discuss these issues on the talk page.
|
Developer(s) | Sebastian Kanthak |
---|---|
Stable release | 0.3.1 / November 14, 2005 |
Type | Ruby on Rails Plugin |
License | MIT License |
Website | http://www.kanthak.net/opensource/file_column/ |
file_column is a popular plugin for Ruby on Rails that allows the easy management of file uploads.
The file_column system is designed to upload a file to a directory named after its objectID (usually the primary key in the database table) this allows for the uploading of different images with the same name.
The default structure of file storage in file_column is:
name_of_your_object/column_name/objectid/filename.ext
Usage
To install via command line, this code is used:
./script/plugin install http://opensvn.csie.org/rails_file_column/plugins/file_column/trunk
After the package is installed in your desired Rails application:
First the plugin is referenced from within your 'entry' model.
file_column :image
On any form for file uploads reference your upload like so.
<%= file_column_field('entry', 'image' ) %>
Finally when referencing an uploaded file, this tag is available.
<%= url_for_file_column('entry', 'image') %>
NB - The model name (entry) and the instance/datebase column name (image) must be identical for both file_column_field()
and url_for_file_column()
See also
External links
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...
- Pages with broken file links
- Articles with topics of unclear notability from November 2009
- Articles to be expanded from May 2008
- All articles to be expanded
- Orphaned articles from September 2006
- All orphaned articles
- Web application frameworks
- Ruby programming language
- Web 2.0
- Free development toolkits and libraries
- Software using the MIT license