Skip to content

inimist/JqueryFileUpload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JqueryFileUpload - CakePHP v 0.1


Using the jQueryFileUpload from blueimp in CakePHP 2.5.5

You can find the documentation [here][fileupload] [fileupload]: https://github.com/blueimp/jQuery-File-Upload

**100% working with latest version of above plugin.

Quick start

  • Download this plugin and move to app/Plugins/JqueryFileUpload

  • Create a table named uploads in your database with the following structure:

CREATE TABLE uploads (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
size int(11) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
  • Include the plugin in your app/Config/bootstrap.php file
CakePlugin::load('JqueryFileUpload');

Upload from anywhere in your form in your VIEW. For exmaple

$this->UploadForm->load(array('embeded'=>true, 'extrafields'=>array('alias'=>'Control', 'foreign_key'=>$this->request->data['Control']['id'])));

Specify 'class'=>'jqueryfileupload' in the $this->Form->create() options in your view file to support multiple instances of the embeded form. In independent forms it works with ID "#fileupload" only.

New Features

While Model and foreign_key passed in extrafields options it would create separate folders for each of your model/ID. This will help you keep your upload separate and show only the record specific uploads. As, with original plugin it will upload all files to single folder.

About

Jquery File Upload for CakePHP 2.x

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 44.3%
  • JavaScript 24.8%
  • HTML 23.1%
  • Go 3.2%
  • Python 2.7%
  • CSS 1.6%
  • ApacheConf 0.3%