thoughtbot /paperclip
Easy file attachment management for ActiveRecord
★ 9,012⑂ 2,399👁 1⑃ 855● 1,847▤ 13
More from this author
+0
Daily
9,012
stars
2,399
forks
1
watchers
855
prs
1,847
issues
13
releases
README
Paperclip ========= Deprecated [Paperclip is deprecated]. For new projects, we recommend Rails' own [ActiveStorage]. For existing projects, please consult and contribute to the migration guide, available [in English], [en español], and as [a video] recorded at RailsConf 2019. You may also prefer [an alternative migration tutorial used by Doorkeeper][]. Alternatively, for existing projects, [Kreeti] is maintaining [kt-paperclip], an ongoing [fork of Paperclip]. We will leave the Issues open as a discussion forum _only_. We do _not_ guarantee a response from us in the Issues. All bug reports should go to kt-paperclip. We are no longer accepting pull requests _except_ pull requests against the migration guide. All other pull requests will be closed without merging. [Paperclip is deprecated]: https://robots.thoughtbot.com/closing-the-trombone [ActiveStorage]: http://guides.rubyonrails.org/active_storage_overview.html [in English]: https://github.com/thoughtbot/paperclip/blob/master/MIGRATING.md [en español]: https://github.com/thoughtbot/paperclip/blob/master/MIGRATING-ES.md [a video]: https://www.youtube.com/watch?v=tZ_WNUytO9o [Kreeti]: https://www.kreeti.com/ [kt-paperclip]: https://rubygems.org/gems/kt-paperclip [fork of Paperclip]: https://github.com/kreeti/kt-paperclip [an alternative migration tutorial used by Doorkeeper]: https://www.tokyodev.com/2021/03/23/paperclip-activestorage/ Existing documentation Documentation valid for master branch Please check the documentation for the paperclip version you are using: https://github.com/thoughtbot/paperclip/releases --- - Requirements - Ruby and Rails - Image Processor - file - Installation - Quick Start - Models - Migrations - Edit and New Views - Edit and New Views with Simple Form - Controller - View Helpers - Checking a File Exists - Deleting an Attachment - Usage - Validations - Internationalization (I18n) - Security Validations - Defaults - Migrations - Add Attachment Column To A Table - Schema Definition - Vintage Syntax - Storage - Understanding Storage - IO Adapters - Post Processing - Custom Attachment Processors - Events - URI Obfuscation - Checksum / Fingerprint - File Preservation for Soft-Delete - Dynamic Configuration - Dynamic Styles: - Dynamic Processors: - Logging - Deployment - Attachment Styles - Testing - Contributing - License - About thoughtbot Paperclip is intended as an easy file attachment library 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 ActiveRecord::Basesave is called. It manages validations based on size and presence, if required. It can transform its assigned image into thumbnails if needed, and the prerequisites are as simple as installing ImageMagick (which, for most modern Unix-based systems, is as easy
Top issues
#2678Paperclip mimemagic dependency licensing implication11 comments · 2021-03-24#2597Status update on paperclip?11 comments · 2018-05-03#2673With Ruby 3.0 validator produces "ArgumentError: wrong number of arguments (given 3, expected 1..2)"6 comments · 2021-02-23#2601Seahorse::Client::NetworkingError6 comments · 2018-05-15#2698"attachment" type migration error in Rails 75 comments · 2021-12-17#2606Migration to Active Storage and CloudFront5 comments · 2018-06-04#2603Trouble creating the migration converting to Active Storage4 comments · 2018-05-23#2685Transfer ownership of gem to Kreeti3 comments · 2021-03-29
Latest release
Version 6.1.0 v6.1.0 2018-07-27BUGFIX: Don't double-encode URLs (Roderick Monje). BUGFIX: Only use the content_type when it exists (Jean-Philippe Doyle). STABILITY: Better handling of the content-disposition header. Now supports file name that is either enclosed or not in double quotes and is case insensitive as per RC6266 grammar (Hasan Kumar, Yves Riel). STABILITY: Change database column type of attachment file size from unsigned 4-byte integer to unsigned 8-byte bigint. The former type limits attachment size to just over 2GB, which can easily be exceeded by a large video file (Laurent Arnoud, Alen Zamanyan). STAB