Upload path dynamically



how can i define a dynamic path for every file that i want to save in my database?


file_1 = c:\objects$name\folder_1
file_2 = c:\objects$name\folder_2
file_3 = c:\objects$name\xxx

in the readme.rst i read about:

    // app/Model/User.php
    $this->Behaviors->Upload->settings['field']['path'] = $newPath;

but i don’t know how i have to implement that for this problem.

Thanks for help.



You can use proffer plugin for file uploading . You can also customize your file path.

Check here…


Thanks Sathish,

but i need it for cakephp 2.x