Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markevans/dragonfly
A Ruby gem for on-the-fly processing - suitable for image uploading in Rails, Sinatra and much more!
https://github.com/markevans/dragonfly
Last synced: 4 days ago
JSON representation
A Ruby gem for on-the-fly processing - suitable for image uploading in Rails, Sinatra and much more!
- Host: GitHub
- URL: https://github.com/markevans/dragonfly
- Owner: markevans
- License: mit
- Created: 2009-08-29T19:15:08.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2024-09-02T11:22:13.000Z (3 months ago)
- Last Synced: 2024-11-20T20:02:32.572Z (23 days ago)
- Language: Ruby
- Homepage: http://markevans.github.io/dragonfly
- Size: 6.4 MB
- Stars: 2,117
- Watchers: 29
- Forks: 244
- Open Issues: 68
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ruby-toolbox - Dragonfly - Dragonfly is a framework that enables on-the-fly processing for any content type. It is especially suited to image handling. Its uses range from image thumbnails to standard attachments to on-demand text generation. (Rails Plugins / Rails File Uploads)
- awesome-ruby - DragonFly - A Ruby gem for on-the-fly processing - suitable for image uploading in Rails, Sinatra and much more!. (File Upload)
README
Dragonfly
===========[![Build Status](https://travis-ci.org/markevans/dragonfly.svg?branch=master)](https://travis-ci.org/markevans/dragonfly)
Hello!!
Dragonfly is a highly customizable ruby gem for handling images and other attachments and is already in use on thousands of websites.If you want to generate image thumbnails in Rails ...
```ruby
class User < ActiveRecord::Base # model
dragonfly_accessor :photo
end
```
```erb
<%= image_tag @user.photo.thumb('300x200#').url if @user.photo_stored? # view %>
```... or generate text images on-demand in Sinatra ...
```ruby
get "/:text" do |text|
Dragonfly.app.generate(:text, text, "font-size" => 32).to_response(env)
end
```... or just generally manage attachments in your web app ...
```ruby
wav = Dragonfly.app.fetch_url("http://free.music/lard.wav") # GET from t'interwebs
mp3 = wav.to_mp3 # to_mp3 is a custom processor
uid = mp3.store # store in the configured datastore, e.g. S3url = Dragonfly.app.remote_url_for(uid) # ===> http://s3.amazon.com/my-stuff/lard.mp3
```... then Dragonfly is for you! See [the documentation](http://markevans.github.io/dragonfly) to get started!
Documentation
=============
THE MAIN DOCUMENTATION IS HERE!!!Installation
============gem install dragonfly
or in your Gemfile
```ruby
gem 'dragonfly', '~> 1.4.0'
```Require with
```ruby
require 'dragonfly'
```
Articles
========
See [the Articles wiki](http://github.com/markevans/dragonfly/wiki/Articles) for articles and tutorials.Please feel free to contribute!!
Examples
========
See [the Wiki](http://github.com/markevans/dragonfly/wiki) and see the pages list for examples.Please feel free to contribute!!
Plugins / add-ons
=================
See [the Add-ons wiki](http://github.com/markevans/dragonfly/wiki/Dragonfly-add-ons).Please feel free to contribute!!
Security notice!
=================
If you have set `verify_urls` to `false` (which is **not** recommended) then you should upgrade to version `1.4.x` for a security fix ([CVE-2021-33564](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-33564)).Issues
======
Please use the github issue tracker if you have any issues.Known Issues
============
There are known issues when using with json gem version 1.5.2 which can potentially cause an "incorrect sha" error for files with non-ascii characters in the name. Please see https://github.com/markevans/dragonfly/issues/387 for more information.Suggestions/Questions
=====================
Google group dragonfly-usersRuby Versions
=============
See [Travis-CI](https://travis-ci.org/markevans/dragonfly) for tested versions.Upgrading from v0.9 to v1.0
===========================
Dragonfly has changed somewhat since version 0.9.
See [the Upgrading wiki](http://github.com/markevans/dragonfly/wiki/Upgrading-from-0.9-to-1.0) for notes on changes, and feel free to add anything you come across while upgrading!Changes are listed in [History.md](https://github.com/markevans/dragonfly/blob/master/History.md)
If for whatever reason you can't upgrade, then
the docs for version 0.9.x are here.Credits
=======
[Mark Evans](http://github.com/markevans) (author) with awesome contributions from
these guys