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
GoogleService Icon
GoogleService is a library to use Google data API easily.
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
PNG-24 Alpha support for IE Icon
Get alpha channel on web, that's possible with PNG-24 images and this trick.
Free
Real Target Icon
Find the real target of a symbolic link.
Free
Calculating ezmlm-hash of an email address Icon
Calculates the ezmlm-hash of an email address for use with mysql.
Free
More