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::Base#save 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 as installing the right packages). Attached files are saved to the filesystem and referenced in the browser by an easily understandable specification, which has sensible and useful defaults. Paperclip will wrap up to four attributes (all prefixed with that attachment's name, so you can have multiple attachments per model if you wish) and give them a friendly front end.

Features

  • Paperclip now requires Ruby version 2.1 or higher
  • ImageMagick must be installed and Paperclip must have access to it
  • Paperclip is distributed as a gem, which is how it should be used in your app
  • Declare that your model has an attachment with the has_attached_file method, and give it a name
  • By default, only <attachment>_file_name is required for Paperclip to operate
  • For validations, Paperclip introduces several validators to validate your attachment

Project Samples

Project Activity

See All Activity >

Categories

File Managers

License

MIT License

Follow Paperclip

Paperclip Web Site

You Might Also Like
Get Advanced Threat Protection for Your Azure Workloads Icon
Get Advanced Threat Protection for Your Azure Workloads

FortiGate NGFW on Azure Enables You to Protect Your Workloads Beyond Basic Azure Security Services

FortiGate NGFW identifies and stops advanced threats with powerful application control, malware protection, web filtering, antivirus, and IPS technology. As the attack surface expands, FortiGate provides integrated and automated protection against emerging and sophisticated threats while securing hybrid or multi-cloud environments. Deploy today in Azure Marketplace.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Paperclip!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Ruby

Related Categories

Ruby File Managers

Registered

2021-06-22