milesj / uploader

[Deprecated] A CakePHP plugin for file uploading and validating.
MIT License
193 stars 73 forks source link

metaColumns is saving only the original Filename and not the renamed one #123

Closed BSE97 closed 11 years ago

BSE97 commented 11 years ago

When I set overwrite to false the Uploader is renaming files with the same filename. But when i save this Filename in a database it only saves the original name and not the renamed one.

public $actsAs = array( 'Uploader.Attachment' => array( 'path' => array( 'tempDir' => TMP, 'uploadDir' => '/home/app/webroot/files/attachments/', 'finalPath' => 'attachments/', 'dbColumn' => 'path', 'defaultPath' => '', 'overwrite' => false, 'stopSave' => true, 'allowEmpty' => true, 'metaColumns' => array('name' => 'name', 'ext' => 'ext', 'basename' => 'basename'), ) ), );

BSE97 commented 11 years ago

I use Uploader 4.2.0 installed through composer

milesj commented 11 years ago

What Transit version is it?

BSE97 commented 11 years ago

1.3.2

milesj commented 11 years ago

Can you try updating to 1.3.3? I just wrote a test case and it seemed to work correctly.

I did make a change recently regarding this, so I believe it was in 1.3.3.

milesj commented 11 years ago

Actually, I think I noticed the problem. Gimme a few.

milesj commented 11 years ago

Ok I figured it out. Updating ti Transit 1.3.5 will fix it.

BSE97 commented 11 years ago

Great thank you