Home-brewed file upload in Ruby on Rails Icon

Home-brewed file upload in Ruby on Rails

I was able to tool it to my needs and fix some bugs.

Home-brewed file upload in Ruby on RailsOverview

Most of this comes from others' work, but I was able to tool it to my needs and fix some bugs. All of these lines go in the model, which for me has a :file and :content_type attributes. :file stores the complete path to the uploaded file. Be sure to change the String in path_to_file to the place where you want files stored, and that proper permissions are set on that path. Also, sanitize_filename doesn't HAVE to be a private method -- make it public if you want.

NEW

Fixed some bugs.

Home-brewed file upload in Ruby on RailsInformation

Version
N/A
Date
07.27.10
License
Free
Language
English
File Size
N/A
Developer
Category
SubCategory
Operating Systems
Windows ,Linux
System Requirements
No additional system requirements.
MP4Info Icon
MP4Info is a library providing read (and, someday, write) access to MP4 tags.
Free
io read file by byte Icon
Description of your code here.
Free
Random Alphanumeric String Generator Icon
This is a script for ruby.
Free
Weft QDA Icon
Weft QDA is an easy-to-use GUI package for the analysis
Demo
Harmonium Chord Library Icon
Harmonium is a Ruby implementation of the Chord distributed.
Free
Lots of Array methods Icon
This is a script for ruby.
Free
Isefad roguelike game Icon
This is an extensible roguelike game, written in Ruby.
Making if and unless consistent? Icon
I've been thinking why some Ruby constructions are inconsistent.
Free
More