@Miles: 

I have it working as expected now. 
The problem was that I was inadvertently supplying delete() with an array. 
I was using named keys in the array and Cake's Core Model.php read() 

if (is_array($this->id)) {
$id = $this->id[0];
}

was failing with an undefined index [0]. I sorted out the array issue and 
looped through the delete and it's now working perfectly. 
Uploader is a huge time saver and I couldn't be any happier with it ;)

Tanks a bunch Miles. 

Regards, 
ED 

On Saturday, March 10, 2012 1:52:29 AM UTC-5, Miles J wrote:
>
> Does the debug() statement appear when doing a model delete?
>
> On Friday, March 9, 2012 9:25:09 PM UTC-8, CrotchFrog wrote:
>>
>> It's correctly generating the path and works fine when manually deleting 
>> with Uploader. 
>>
>> On Friday, March 9, 2012 1:30:31 PM UTC-5, Miles J wrote:
>>>
>>> Can you throw some debug($path)'s in Uploader.delete() to see if its 
>>> generating the correct absolute path.
>>>
>>> On Thursday, March 8, 2012 9:38:05 PM UTC-8, CrotchFrog wrote:
>>>>
>>>> Using Cake 2.1 & Uploader 3.3
>>>>
>>>> 'Uploader.Attachment' => array(
>>>> 'fileName' => array(
>>>> 'name' => 'generateFilename', 
>>>> 'baseDir' => '',     
>>>> 'uploadDir' => 'img/artist',                 
>>>> 'dbColumn' => 'path',        
>>>> 'importFrom' => '', 
>>>> 'defaultPath' => '', 
>>>> 'maxNameLength' => 30, 
>>>> 'overwrite' => true, 
>>>> 'stopSave' => true, 
>>>> 'allowEmpty' => false, 
>>>> 'transforms' => array(), 
>>>> 's3' => array(), 
>>>> 'metaColumns' => array( 
>>>> 'ext' => 'ext',
>>>> 'type' => 'type',
>>>> 'size' => 'size',
>>>> 'group' => 'group',
>>>> 'width' => '',
>>>> 'height' => '',
>>>> 'filesize' => 'filesize',
>>>>                                 'name' => 'name'
>>>> )
>>>> )
>>>> )
>>>>
>>>> public $belongsTo = array(
>>>>             
>>>> 'Artist' => array(
>>>> 'className' => 'Artist',
>>>> 'foreignKey' => 'artist_id',
>>>> 'conditions' => '',
>>>> 'fields' => '',
>>>> 'order' => ''
>>>> )
>>>> );
>>>>
>>>> - ED 
>>>>
>>>> On Thursday, March 8, 2012 3:56:50 AM UTC-5, CrotchFrog wrote:
>>>>>
>>>>> @Miles, 
>>>>>
>>>>> With the newest version of your uploader, when deleting a row from the 
>>>>> db the corresponding file should be deleted locally. 
>>>>>
>>>>> I have everything else working great except for file deletion. 
>>>>>
>>>>> What am I overlooking? 
>>>>>
>>>>> Regards, 
>>>>> ED 
>>>>>
>>>>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to