sandelius/li3_attachable — Issue #2: File name saved to db does not match config 'path' format
Author: housni
Created: 2012-03-04 20:22:31+00:00
State: open

First of all, great plugin. Really makes my life easier.

I have the following in my `Campaigns` model:

Attachable::bind(__CLASS__, array(
'grid_filename' => array(
'path' => '{:root}/webroot/img/{:model}/{:id}/grid_{:filename}',
'url' => '/img/{:model}/{:id}/{:filename}',
'default' => '/img/missing.png'
),
'campaign_filename' => array(
'path' => '{:root}/webroot/img/{:model}/{:id}/campaign_{:filename}',
'url' => '/img/{:model}/{:id}/{:filename}',
'default' => '/img/missing.png'
)
));

If I upload a file named example.png from the `grid_filename` file field, I'd expect `Campaigns.grid_filename` to contain `grid_example.png` but, instead, it contains `example.png`.

I just want to know if this is the intended behaviour or if it's an oversight that might be fixed in the future so that I can keep my eye on this and make the changes to my app when necessary.