#253 CarrierWave File Uploads
Feb 14, 2011 | 9 minutes | Plugins
CarrierWave makes it easy and clean to add file uploads to your application. It supports a variety of ORMs, frameworks and image processors.
- Download:
- source codeProject Files in Zip (480 KB)
- mp4Full Size H.264 Video (21 MB)
- m4vSmaller H.264 Video (11.7 MB)
- webmFull Size VP8 Video (24.9 MB)
- ogvFull Size Theora Video (25.4 MB)
Handling Exceptions (revised)
By default, Rails will render a static error file when an exception occurs in production. Here you will learn how to fully customize this behavior and render dynamic error pages.
(11 minutes)
Custom App Generators (revised)
Learn how to customize the Rails app generator to fit your preference. This episode shows how to do this using .railsrc file, app templates, app builders, RailsWizard, and AppScrolls.
(10 minutes)
Importing CSV and Excel
Allow users to import records into the database by uploading a CSV or Excel document. Here I show how to use Roo to parse these files and present a solution for validations.
(10 minutes)
YAML Configuration (revised)
Keeping passwords and secret tokens in source control is a security risk. Here I show how to move these settings out into a YAML configuration file which can be loaded in as a hash or environment variables.
(8 minutes)
Uploading to Amazon S3
Here I show how to upload files directly to Amazon S3 using CarrierWave Direct and Fog. I then walk through another project which uses jQuery File Upload to handle multiple files and does not use CarrierWave.
(14 minutes)