Overview
Attachinary is an innovative gem designed to simplify the management of file attachments, including photos and raw files, in your applications without modifying your model's schema. It's an ideal solution for developers looking for a lightweight and efficient way to handle attachments in either has_one or has_many relations, all while ensuring minimal setup effort. By leveraging the power of Cloudinary, Attachinary focuses on providing a robust and seamless experience for file uploads that integrates beautifully with most Rails applications.
What sets Attachinary apart is its flexibility to work with both ActiveRecord and Mongoid ORMs. The approach it takes eliminates the need for traditional file management processes, giving developers a quick and hassle-free way to introduce attachment capabilities into their models. With just a single line of code, you can enable attachments, freeing you from the complications that usually come with managing files.
Features
- ORM Compatibility: Works seamlessly with both ActiveRecord and Mongoid ORMs, making it versatile for various applications.
- Schema-Friendly: No need to alter your model schema for different kinds of attachments, simplifying the development process significantly.
- Dynamic Thumbnails: Thumbnails are generated on-the-fly by Cloudinary, eliminating the need for additional libraries like ImageMagick.
- Asynchronous File Uploads: Handles file uploads asynchronously, ensuring that your application's performance remains unaffected while passing only metadata to the server.
- Customizable jQuery Plugin: Offers a fully customizable jQuery plugin for async file uploads, including features like drag and drop, multiple file selection, and progress indicators.
- Cloudinary Features: Utilizes Cloudinary’s extensive capabilities, allowing you to resize, crop, and even apply face detection to your images effortlessly.
- Simplified Usage: Once set up, integrating attachment support into your model requires just one line of code—no migrations or uploaders necessary.
- Lightweight Form Submission: Enhances form submission by minimizing the data sent to the server, promoting faster and more reliable postbacks.