Multiple File Upload In Cake Php
Steps. Place UploadHandler.php in vendor/file.upload. You can use any name instead of file.upload. Have jQuery setup in your app.
Copy jQuery File Upload files in the proper directories of your Cake app, usually webroot/js. You can now initialize jQuery-File-Upload options in your controller using following way.App::import('Vendor', 'UploadHandler', array('file' = 'file.upload/UploadHandler.php'));$options = array('uploaddir' = 'Your upload directory','acceptfiletypes' = '/.(gif jpe?g png)$/i');$uploadhandler = new UploadHandler($options).
Ajax Upload Multiple Files
@Hovo first of all you're still using the wrong key here; $this-data'posts'docfile'tmpname', which should be $this-data'Post'docfile'tmpname'. However, the problem you're seeing is caused because you're trying to use $this-data'Post'docfile' as value for the 'docfile' field in your database, but because this is an array, this won't work directly.
You'll have to change that data and only use the file-name for your database. I'll try to add an example–May 1 '13 at 7:06.