/cakephp_google_storage

A Simple Google Storage Plugin for the CakePHP Framework

Primary LanguagePHP

Google Storage Plugin

A plugin to storage images and files in Google Storage

Background

While working on studdr.com we noticed that Amazon S3 couldn’t give us the speed
boosts we needed, so we moved to Google Storage and since there were no decent
plugins we built our own

Requirements

  • PHP 5.3+
  • CakePHP 1.3

Get The Source

[Manual]

  1. Download this: git@github.com:jonbradley/google_storage.git/zipball/master
  2. Unzip that download.
  3. Copy the resulting folder to app/plugins
  4. Rename the folder you just copied to google_storage

[GIT Clone]

  • In your plugin directory type
    git clone git@github.com:jonbradley/google_storage.git google_storage

Installation

  • Move the settings.php.default to settings.php
  • Edit the configuration variables in settings.php
  • Add the following to the controller you wish to use this in
    public $components = array('GoogleStorage.GoogleStorage');
  • Add this to your action or component u wish to use this in to publish an image
    $this->GoogleStorage->publish($fileTempName, $fileName);

Configuration

  1. AccessKey : your legacy access key
  2. AccessKeySecret : your legacy access key secret
  3. Bucket : the name of the bucket
  4. Debug : true or false for debugging

Todo

  • Add the rest of the API

License

Copyright © 2011 Jonathan Bradley

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.