I've written this behavior which I typically use for file uploads.
It's short and pretty easy to use, maybe you'll find it useful. You
can set the directory in which the file should be saved by setting the
option "destination".
If you attact the behavior like this,
$this->YourController->Behaviors->attach('File', array('destination'
=> 'yourpath'));
you can construct the path from variables available to your
controller.
On 19 Aug., 22:18, bartez <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I've scouted both here and the bakery etc and have had no success in
> finding the answer to my problem.
>
> I would like to upload an image and save it in a file system (not a
> database).
>
> I would like the structure to be as follows
>
> img
> / items
> / groups
> /id
> /each individual image here
>
> I've done this before in normal php but I'm sure there must be a cake
> way!!
>
> Thanks for your help in advance.
>
> Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---