PHPackages                             webtechnick/cakephp-cloud-files-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webtechnick/cakephp-cloud-files-plugin

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

webtechnick/cakephp-cloud-files-plugin
======================================

CakePHP Cloud Files Plugin

v1.4.0(12y ago)12247[4 issues](https://github.com/webtechnick/CakePHP-CloudFiles-Plugin/issues)MITPHPPHP &gt;=5.3.0

Since Oct 4Pushed 11y ago5 watchersCompare

[ Source](https://github.com/webtechnick/CakePHP-CloudFiles-Plugin)[ Packagist](https://packagist.org/packages/webtechnick/cakephp-cloud-files-plugin)[ Docs](https://github.com/webtechnick/CakePHP-CloudFiles-Plugin)[ RSS](/packages/webtechnick-cakephp-cloud-files-plugin/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Rackspace CloudFiles CakePHP Plugin
===================================

[](#rackspace-cloudfiles-cakephp-plugin)

- Author: Nick Baker
- Version: 1.4.0
- License: MIT
- Website:

This plugin is used to interface with the Rackspace CloudFiles service. This plugin utilizes the php-cloudfiles provided by rackspace

Requirements
------------

[](#requirements)

- CakePHP 2.x, PHP 5.x
- Any requirements defined by

Changelog
---------

[](#changelog)

- 1.4.0: Upgraded to  instead of deprecated . Update your submodules.
- 1.3.0: Added CloudFiles::exists and CloudFiles::upload now will check if file exists before uploading (default off)
- 1.2.0: Added CloudFiles.cloud\_files shell for basic upload/delete of files to your CDN
- 1.1.0: Added CloudFiles::listContainer, CloudFiles::createContainer, CloudFiles::deleteContainer
- 1.0.1: Added CloudFiles::download
- 1.0.0: Initial Release -- More polish, added CloudFilesHelper, all basic REST actions on cloud files implemented.
- 0.0.2: Added CloudFiles Library -- utilizing the rackspace php-cloudfiles library and implemented upload function CloudFiles::upload, CloudFiles::delete, CloudFiles::ls
- 0.0.1: Initial Commit -- Skeleton plugin�

Installation
------------

[](#installation)

There are two ways to install the plugin, via GIT with submodules or manually by downloading two repositories

### Git Installation (recommended)

[](#git-installation-recommended)

After cloning the repository, you must run git submodule init and update to pull in the required vendor

```
git clone git://github.com/webtechnick/CakePHP-CloudFiles-Plugin.git app/Plugin/CloudFiles
cd app/Plugin/CloudFiles
git submodule init
git submodule update

```

### Manual Installation

[](#manual-installation)

- Download this plugin into `app/Plugin/CloudFiles`
- Download  into `app/Plugin/CloudFiles/Vendor/php-opencloud`

Setup and Configuration
-----------------------

[](#setup-and-configuration)

Ensure the plugin is loaded in `app/Config/bootstrap.php` by calling `CakePlugin::load('CloudFiles');`

Create a file `app/Config/cloud_files.php` with the following:

```
$config = array(
	'CloudFiles' => array(
		'server' => 'US', //UK
		'username' => 'your_username', //your username
		'api_key' => 'API_KEY', //your api key
		'region' => 'ORD', //ORD, DFW, LON
		'url_type' => 'publicURL',
		'tenant_name' => ''
	)
);

```

Example of this configuration file is in `app/Plugin/CloudFiles/Config/cloud_files.php.default`

Usage Examples
--------------

[](#usage-examples)

Basic Usage examples below

### Upload a file to rackspace

[](#upload-a-file-to-rackspace)

Uploads a local file to the specified container in rackspace

```
App::uses('CloudFiles','CloudFiles.Lib');
$cdn_url = CloudFiles::upload('/path/to/image.jpg','container_name');
//Will not re-upload the same image if it's already in the CDN
CloudFiles::upload('/path/to/image.jpg', 'container_name', array('overwrite' => false));

```

*TIP:* There is also a built in shell to help upload directories and files

```
//Rerusively upload a directory to a container on rackspace
$ cake CloudFiles.cloud_files -r upload /path/to/directory container_name

//Upload a single file to a container on rackspace
$ cake CloudFiles.cloud_files upload_file /path/to/file.ext container_name

```

### Download a file from rackspace

[](#download-a-file-from-rackspace)

Download a remote file in a specific container to a local file

```
App::uses('CloudFiles','CloudFiles.Lib');
CloudFiles::download('image.jpg', 'container_name', '/local/path/to/image.jpg');

```

### Delete a file from rackspace

[](#delete-a-file-from-rackspace)

Delete a file from a specific container on rackspace

```
App::uses('CloudFiles','CloudFiles.Lib');
CloudFiles::delete('image.jpg','container_name');

```

*TIP:* There is also a built in shell to help delete files on rackspace

```
//Delete a single file in a container on rackspace
$ cake CloudFiles.cloud_files delete_file file.ext container_name

//Delete all files in a container as well as the container
$ cake CloudFiles.cloud_files delete_container container_name

```

### List files on rackspace

[](#list-files-on-rackspace)

List files in a specified container on rackspace

```
App::uses('CloudFiles','CloudFiles.Lib');
//Get all files in container
$files = CloudFiles::ls('container_name');

//Get files starting with a prefix
$files = CloudFiles::ls('container_name', array(
	'prefix' => 'cake'
));

//Limit the files returned
$files = CloudFiles::ls('container_name', array(
	'limit' => 10
));

//Limit the files returned, starting at marker
$files = CloudFiles::ls('container_name', array(
	'limit' => 10,
	'marker' => 30
));

```

### Public or Streaming URL of a file on rackspace

[](#public-or-streaming-url-of-a-file-on-rackspace)

Get the URL of an object in rackspace (streaming or public)

```
App::uses('CloudFiles','CloudFiles.Lib');
$url = CloudFiles::url('image.jpg','container_name');

$stream = CloudFiles::stream('movie.mov', 'container_name');

```

There is also a helper class to assist image and streaming retrieval

```
//Some Controller
public $helpers = array('CloudFiles.CloudFiles');

//Some View
echo $this->CloudFiles->image('image.jpg','container_name');
echo $this->CloudFiles->stream('movie.mov', 'container_name');
echo $this->CloudFiles->url('some_file.txt', 'container_name');

```

### List containers on rackspace

[](#list-containers-on-rackspace)

List all containers on rackspace

```
App::uses('CloudFiles','CloudFiles.Lib');
//Get all containers
$containers = CloudFiles::listContainers();
//Limit the containers returned
$containers = CloudFiles::listContainers(array(
	'limit' => 2
));

```

### Create container on rackspace

[](#create-container-on-rackspace)

Created a container on rackspace, defaults to public container (CDN)

```
App::uses('CloudFiles','CloudFiles.Lib');
$Container = CloudFiles::createContainer('css');

```

*TIP:* There is a shell to help create containers.

```
$ cake CloudFiles.cloud_files create_container container_name

```

### Delete a container on rackspace

[](#delete-a-container-on-rackspace)

Delete a container on rackspace, notice container must be empty.

```
App::uses('CloudFiles', 'CloudFiles.Lib');
CloudFiles::deleteContainer('container_name');

```

*TIP:* There is a shell to help delete containers. Note, this also deletes all files prior to deleting the container

```
$ cake CloudFiles.cloud_files delete_container container_name

```

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4699d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26438?v=4)[Nick Baker](/maintainers/webtechnick)[@webtechnick](https://github.com/webtechnick)

---

Top Contributors

[![webtechnick](https://avatars.githubusercontent.com/u/26438?v=4)](https://github.com/webtechnick "webtechnick (59 commits)")[![laranicolas](https://avatars.githubusercontent.com/u/1824473?v=4)](https://github.com/laranicolas "laranicolas (1 commits)")

---

Tags

plugincakephpcdnrackspaceCloud Files

### Embed Badge

![Health badge](/badges/webtechnick-cakephp-cloud-files-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/webtechnick-cakephp-cloud-files-plugin/health.svg)](https://phpackages.com/packages/webtechnick-cakephp-cloud-files-plugin)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.6k10](/packages/helsingborg-stad-municipio)[mediawiki/maps

Adds various mapping features to MediaWiki

85155.1k3](/packages/mediawiki-maps)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

20256.6k4](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19233.0k4](/packages/altis-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
