This is a demo Rails application that showcases how to integrate and work with Cloudinary, a cloud-based media management service, in a Ruby on Rails project.
Cloudinary is a powerful cloud-based media management platform that provides various services like image and video upload, storage, manipulation, and delivery. This Rails demo project demonstrates how to integrate Cloudinary into your application for efficient media handling.
- Uploading images to Cloudinary from the Rails application.
- Displaying images using Cloudinary's URLs and transformations.
- Cloudinary-based image manipulation and optimization.
Follow these steps to set up the project locally:
- Clone this repository:
git clone git@github.com:mwaurajr/cloudinary.git
- Navigate to the project directory:
cd cloudinary
- Install dependencies:
bundle install
- Set up the database:
rails db:create db:migrate
- Start the Rails server:
bin/dev
-
Create a Cloudinary account at https://cloudinary.com.
-
Obtain your Cloudinary API credentials: cloud name, API key, and API secret.
-
Configure your Cloudinary credentials in the Rails application:
- Create
config/cloudinary.yml
- Add
cloud_name
,api_key
, andapi_secret
with your Cloudinary credentials.
- Create
- Upload images from your local machine.
- The uploaded images will be stored in your Cloudinary account.
- Use Cloudinary's transformation features to manipulate the displayed images.
- Explore the code to understand how Cloudinary integration is implemented.
This project uses the following gems for various functionalities:
cloudinary
gem for Cloudinary integration.
Image
: Model to store image information, including the Cloudinary public ID.
UsersController
: Manages user registration and authentication.ImagesController
: Handles image uploading and display.
images
views for image-related actions.
Contributions are welcome! If you find any issues or want to enhance the project, feel free to open a pull request.
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
. - Make your changes and commit them:
git commit -m "Add your feature"
. - Push to the branch:
git push origin feature/your-feature-name
. - Open a pull request explaining your changes.
This project is licensed under the MIT License.
Note: This README is a template. Please customize it according to your project structure and requirements.
For detailed information about Cloudinary integration, refer to the official Cloudinary Documentation.