Skip to content

ryanicle/cakephp-cloudinary-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Cloudinary Component for CakePHP 2.x

A Cakephp component for Cloudinary cloud image service.

Installation

  1. Download and extract Cloudinary PHP library from https://github.com/cloudinary/cloudinary_php to app/Vendor/Cloudinary

  2. Download from https://github.com/ryanicle/cakephp-cloudinary-component

  3. Set variables in app/Config/bootstrap.php

     	// Cloudinary.env - sign up and get this from http://cloudinary.com
     	// Cloudinary.path - tmp path for images
     	Configure::write(
     		'Cloudinary', 
     		array(
     			'env' =>  '',
     			'path' => APP . 'webroot' . DS . 'img' . DS . 'photos'
     		)
     	);
    
  4. Place CloudinaryComponent.php in app/Controller/Component/

  5. Done!

Usage

Call the component in controller

		class ExampleController extends AppController {
			public $name = 'Example';

			public $components = array(
				'CloudinaryComponent'
			);

			public function index() {
				// Assume you have already uploaded images to tmp locations
				$this->Cloudinary->upload($file);
			}
		}			

Limitation

Currently, it only supports uploading and deleteing images. 

Need help or want to contribute?

Please feel free to drop me a note.

About

A Cakephp component for Cloudinary cloud image service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages