Now everything is working like i expected.
To keep the file in {IMAGE}... and delete the file in {APP}... im
using the afterSave callback in my model:
function afterSave() {
if (!empty($this-data[$this-name]['logo'])) {
$baseDir= ROOT .
I think Is better to use the original path:
function afterSave() {
if (!empty($this-data[$this-name]['logo'])) {
$path= $output = str_replace(//, /,
$this-data[$this-name]['original']);
@unlink($path);
}
Im sharing the replace of double slashes and the path to convert, maybe
exist
a better way to achieve that.
function __imConvert($model, $input, $params = array(), $output =
null, $return = false) {
if (isset($params['return'])) {
$return = $params['return'];