-2

I want to make my own "plugin" to upload my files, cause I can't work with this (https://github.com/josegonzalez/cakephp-upload) with multiples fields and tables, so I've decided to create my own.

So, which part may I put my code? Do I need to create a behavior? Or just put on "AppModel.php" or "AppController.php" to it works? Thanks!

Sorry for the bad english.

tereško
  • 58,060
  • 25
  • 98
  • 150
  • See this link http://stackoverflow.com/questions/16262194/file-upload-in-cakephp-2-3 – Supravat Mondal Feb 18 '15 at 18:08
  • What's the issue with Joses plugin? It contains detailed information how do to what you want including examples: https://github.com/josegonzalez/cakephp-upload/blob/master/docs/examples.rst#uploading-multiple-files – floriank Feb 18 '15 at 18:43

1 Answers1

0

If you want to follow MVC protocols, then the code should be in the model. If you want to share the code across the app, then either create a behavior to call on, or place the code in the appModel

Colonel Mustard
  • 1,482
  • 2
  • 17
  • 42