File column

File column

Infobox_Software
name = file_column
developer = Sebastian Kanthak
latest_release_version = 0.3.1
latest_release_date = November 14, 2005
genre = Ruby on Rails Plugin
license = MIT License
website = [http://www.kanthak.net/opensource/file_column/ 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()"

ee also

* Ruby on Rails
* mod ruby

External links

* [http://www.kanthak.net/opensource/file_column/ Sebastian Kanthak's File Column Site]
* [http://wiki.rubyonrails.org/rails/pages/HowToUseFileColumn File Column at Rubyonrails.org Wiki]
* [http://www.bopia.com/log/2006/08/how_to_upload_images_with_file.php Bopia Guide to Using File Column]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Column — Col umn, n. [L. columna, fr. columen, culmen, fr. cellere (used only in comp.), akin to E. excel, and prob. to holm. See {Holm}, and cf. {Colonel}.] 1. (Arch.) A kind of pillar; a cylindrical or polygonal support for a roof, ceiling, statue, etc …   The Collaborative International Dictionary of English

  • Column rule — Column Col umn, n. [L. columna, fr. columen, culmen, fr. cellere (used only in comp.), akin to E. excel, and prob. to holm. See {Holm}, and cf. {Colonel}.] 1. (Arch.) A kind of pillar; a cylindrical or polygonal support for a roof, ceiling,… …   The Collaborative International Dictionary of English

  • File — has several meanings:* Filing cabinet * File (tool) * A nail file * Filing (legal) * Filing (manufacturing process) * File (formation) Military term for a single column of men one in front of the other. See also Rank (formation) * File (chess) *… …   Wikipedia

  • column — [käl′əm] n. [ME & OFr colomne < L columna, collateral form of columen, column, pillar < IE base * kel , to project > HILL, HOLM1, Gr kolophōn] 1. a slender upright structure, generally consisting of a cylindrical shaft, a base, and a… …   English World dictionary

  • file — [n1] system of order, placement for ease of use book, cabinet, case, census, charts, circular file*, data, directory, docket, documents, dossier, folder, index, information, list, notebook, pigeonhole*, portfolio, record, register, repository;… …   New thesaurus

  • column — [n1] line, procession cavalcade, company, file, list, platoon, queue, rank, row, string, train; concepts 432,727 column [n2] pillar brace, buttress, caryatid, colonnade, cylinder, mast, minaret, monolith, monument, obelisk, pedestal, peristyle,… …   New thesaurus

  • File closer — File clos er (Mil.) A commissioned or noncommissioned officer posted in the rear of a line, or on the flank of a column, of soldiers, to rectify mistakes and insure steadiness and promptness in the ranks. [Webster 1913 Suppl.] …   The Collaborative International Dictionary of English

  • File dialog — A save as file dialog from GTK+. The file browser is hidden inside a disclosure widget. In computing, a file dialog (also called File Selector/Chooser, file requester, or open and save dialog) is a dialog box that allows users to choose a file… …   Wikipedia

  • file — I (New American Roget s College Thesaurus) n. arrangement, classification; list, dossier, record, catalog, inventory; folder; row, column; rasp. v. t. classify, arrange, store; catalog, record; submit, deliver; rasp. See continuity, friction. II… …   English dictionary for students

  • file — Synonyms and related words: Indian file, KP, ablate, abrade, abrase, achievement, aculeate, acuminate, alerion, alphabetize, aluminum oxide, ammunition box, analyze, animal charge, annulet, apply for, archives, argent, ark, armorial bearings,… …   Moby Thesaurus

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”