PHPackages                             dala00/cakephp-simple-upload - 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. [Database &amp; ORM](/categories/database)
4. /
5. dala00/cakephp-simple-upload

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

dala00/cakephp-simple-upload
============================

Upload handle plugin for CakePHP

1.0.5(9y ago)1372MITPHPPHP &gt;=5.4.16

Since Apr 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/dala00/cakephp-simple-upload)[ Packagist](https://packagist.org/packages/dala00/cakephp-simple-upload)[ RSS](/packages/dala00-cakephp-simple-upload/feed)WikiDiscussions master Synced today

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

Simple upload handle plugin for CakePHP3
========================================

[](#simple-upload-handle-plugin-for-cakephp3)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/0257b43f4040f3e43362cfeb6d07be75bd1e1ddfec826fdbcdb5917bdcf89ef3/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f64616c6130302f63616b657068702d73696d706c652d75706c6f61642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/dala00/cakephp-simple-upload)[![Coverage Status](https://camo.githubusercontent.com/567fe398cb923a76c483a7be522395edbd41feeed5b25d2c88a386af697da962/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f64616c6130302f63616b657068702d73696d706c652d75706c6f61642e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/github/dala00/cakephp-simple-upload)

Description
-----------

[](#description)

- Handle file post to save and upload automatically.
- UploadHelper can output URL and img tag on template.
- Methods for confirm page are available.

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require dala00/cakephp-simple-upload

```

And load plugin on bootstrap.php.

```
Plugin::load('Dala00/Upload');
```

Usage
-----

[](#usage)

Load UploadBehavior with options.

```
class SomeTable extends Table {
	public function initialize(array $config) {
		$this->addBehavior('Dala00/Upload.Upload', [
			'fields' => [
				'photo' => [
					'path' => 'webroot{DS}files{DS}{model}{DS}{primaryKey}{DS}{field}{DS}'
				],
			],
		]);
	}
}
```

### UploadHelper

[](#uploadhelper)

You can output URL or img tag with UploadHelper.

```
// In Controller
public $helpers = ['Dala00/Upload.Upload'];
```

```
(In Templates)
