Closed karthikeyanangler closed 6 years ago
I would recommend implementing your own Path Processor class for this job. As then you can write your own code to build the path using whatever data you choose.
http://cakephp-upload.readthedocs.io/en/latest/interfaces.html#processorinterface
I use the field value, in the table
$this->addBehavior('Josegonzalez/Upload.Upload', [
'nombre' => [
'path' => 'webroot{DS}img{DS}uploads{DS}tickets{DS}{field-value:ticket_id}{DS}',
],
]);
@raul338 Amazing, its working, thanks a lot 👍
Dear Friends,
I am trying to use this plugin for gallery images module in my portal. I am trying to store the images in following directory
webroot/files/galleries/<gallery_id>
. How can i achieve it? i was trying to add this as hidden value in the form like thisBut its not helping me to resolve my requirement, please help me.
My Behavior Configuration in
GalleryImagesTable.php
fileGallery Image
add.ctp
file