I'm looking to dynamically change the behavior's settings from
controller. Background: I'm trying to change the "allowedSize" aka
upload limit in Andy's UploadBehavior toolkit.

I came up with this:
$this->Post->Attachment->behaviors['ImageUpload']-
>settings['Attachment'] = am($this->Post->Attachment-
>behaviors['ImageUpload']->settings['Attachment'], array(
    'allowedSize' => '1',
    'allowedSizeUnits' => 'KB',
));

The current disadvantage of this method is that I couldn't find a way
to change the validation error message (Still showing default "The
file uploaded is too big, only files less than 8 MB permitted.")

Just like to know if there is any better approach for this?

--
  <?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com    Blog: http://rajeshanbiah.blogspot.com/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to