PHPackages                             josegonzalez/cakephp-upload-with-rename - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. josegonzalez/cakephp-upload-with-rename

ActiveCakephp-plugin[File &amp; Storage](/categories/file-storage)

josegonzalez/cakephp-upload-with-rename
=======================================

CakePHP plugin to handle file uploading sans ridiculous automagic

1.0.1(12y ago)052MITPHP

Since Sep 20Pushed 12y ago1 watchersCompare

[ Source](https://github.com/krisldz/cakephp-upload)[ Packagist](https://packagist.org/packages/josegonzalez/cakephp-upload-with-rename)[ Docs](http://github.com/josegonzalez/cakephp-upload)[ RSS](/packages/josegonzalez-cakephp-upload-with-rename/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/722dd2a17d7b024dbf2c6705cebd7afe014a0a1b1a2812e8907f97b8d0530318/68747470733a2f2f7472617669732d63692e6f72672f6a6f7365676f6e7a616c657a2f63616b657068702d75706c6f61642e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/josegonzalez/cakephp-upload) [![Coverage Status](https://camo.githubusercontent.com/3793c27d4ab2a8d2aa29168d10978c8c698be585059e044c72e91c8510921245/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6a6f7365676f6e7a616c657a2f63616b657068702d75706c6f61642f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/josegonzalez/cakephp-upload?branch=master) [![Total Downloads](https://camo.githubusercontent.com/fe74d1f9bf61e12357db50d0ae84dacf18b2630d5ee80d664e121d168cfd22b0/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7365676f6e7a616c657a2f63616b657068702d75706c6f61642f642f746f74616c2e706e67)](https://packagist.org/packages/josegonzalez/cakephp-upload) [![Latest Stable Version](https://camo.githubusercontent.com/da2de4b4ea151b1b4a399126dfa252000eddb63e87a5d4bb7af80a1ae8e801e3/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7365676f6e7a616c657a2f63616b657068702d75706c6f61642f762f737461626c652e706e67)](https://packagist.org/packages/josegonzalez/cakephp-upload)

Upload Plugin 2.0
=================

[](#upload-plugin-20)

The Upload Plugin is an attempt to sanely upload files using techniques garnered packages such as [MeioUpload](http://github.com/jrbasso/MeioUpload) , [UploadPack](http://github.com/szajbus/cakephp-uploadpack) and [PHP documentation](http://php.net/manual/en/features.file-upload.php).

Background
----------

[](#background)

Media Plugin is too complicated, and it was a PITA to merge the latest updates into MeioUpload, so here I am, building yet another upload plugin. I'll build another in a month and call it "YAUP".

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

[](#requirements)

- CakePHP 2.x
- Imagick/GD PHP Extension (for Thumbnail Creation)
- PHP5
- Patience

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

[](#installation)

*\[Using [Composer](http://getcomposer.org/)\]*

[View on Packagist](https://packagist.org/packages/josegonzalez/cakephp-upload), and copy the json snippet for the latest version into your project's `composer.json`. Eg, v. 1.0.0 would look like this:

```
{
	"require": {
		"josegonzalez/cakephp-upload": "1.0.0"
	}
}
```

Because this plugin has the type `cakephp-plugin` set in it's own `composer.json`, composer knows to install it inside your `/Plugins` directory, rather than in the usual vendors file. It is recommended that you add `/Plugins/Upload` to your .gitignore file. (Why? [read this](http://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md).)

*\[Manual\]*

- Download this:
- Unzip that download.
- Copy the resulting folder to `app/Plugin`
- Rename the folder you just copied to `Upload`

*\[GIT Submodule\]*

In your app directory type:

```
git submodule add -b master git://github.com/josegonzalez/cakephp-upload.git Plugin/Upload
git submodule init
git submodule update
```

*\[GIT Clone\]*

In your `Plugin` directory type:

```
git clone -b master git://github.com/josegonzalez/cakephp-upload.git Upload
```

### Imagick Support

[](#imagick-support)

To enable Imagick support, you need to have imagick installed:

```
# Debian systems
sudo apt-get install php-imagick

# OS X Homebrew
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-imagick

# From pecl
pecl install imagick
```

If you cannot install imagick, please do not use imagick, and instead configure the plugin with `'thumbnailMethod'  => 'php'` in your setup options.

### Enable plugin

[](#enable-plugin)

In 2.0 you need to enable the plugin your `app/Config/bootstrap.php` file:

```
