README.rdoc

About

Paperclip is intended as an easy file attachment library for Sequel. It was
heavily inspired by Paperclip for
Activerecord. The intent behind it was to keep setup as easy as
possible and to treat files as much like other attributes as possible. This
means they aren't saved to their final locations on disk, nor are they
deleted if set to nil, until #save is called. It has support for
interpolations and postprocessors, including standart ones like a
thumbnail generator by default.

Install

Simply install it as any other gem:

gem install sequel_paperclip

Or when using bundler, add it got your Gemfile:

gem sequel_paperclip

Some postprocessors depend on external libraries or programs. Please see
the processors sections for details.

Processors

Processors are run before the attachment is saved. Multiple processors can
be specified, and they will be invoked in the order they are defined in
the :processors array.

The following processors are included by default:

image

Adds the ability to generate thumbnails. Requires imagemagick to installed
and the convert and identify commands being in the path and executable.
Expects a geometry definition for each defined style. If a format is
defined for a style, the image is converted to that format.

dummy

This processor is only used internally and should never be used.

Storage

Attachments are stored as files in the file system. To specify the
location, please have a look at the example above and interpolations.

Todo

Source documentation (rdoc)

Tests

Contributing

If you'd like to contribute a feature or bugfix: Thanks! To make sure
your fix/feature has a high chance of being included, please read the
following guidelines:

Fork the project.

Make your feature addition or bug fix.

Add tests for it. This is important so we don’t break anything in a future
version unintentionally.

Commit, do not mess with rakefile, version, or history. (if you want to
have your own version, that is fine but bump version in a commit by itself
I can ignore when I pull)