Thanks Johannes,

When I try stripping down it saves the record in the database with "name"
as empty.

On Mon, Sep 10, 2012 at 8:12 AM, Johannes N <[email protected]>wrote:

> well, probably it's the
>
> 'name' => 'name' // Saves the file in database with actual name of
> uploaded file
>
> line. :) i would strip down the code to the only needed lines, so you
> would end with:
>
>
>
>    1. 'Uploader.Attachment' => array <http://www.php.net/array>(
>    2.         'fileName' => array <http://www.php.net/array>(
>    3.             'name'      => 'generateFilename',
>    4.             'dbColumn'  => 'path',
>    5.             'overwrite' => false,
>    6.             'stopSave'  => true,
>    7.             'allowEmpty'    => false,
>    8.     );
>
>
> greetings,
>
> On Monday, September 10, 2012 2:01:16 PM UTC+2, CrotchFrog wrote:
>>
>> I'm using Miles J Uploader plugin and Cake 2.2.2. I've configured the
>> plugin in my model as $actsAs => Uploader.attachment.
>> What I'm having problems with is that I have a custom function in the
>> bootstrap to save the file with a unique filename and that works ok
>> but its saves the record in the database with the original name of the
>> uploaded file. Any idea how to get the two filenames to match?
>>
>> Please see Pastebin:
>> http://bin.cakephp.org/view/**70326247<http://bin.cakephp.org/view/70326247>
>>
>>
>> - ED
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to