I'm using Meioupload on a website built with CakePHP, and it is working fine for having multiple upload fields. The problem I have now is that if person A uploads a picture called 'me.jpg' and then person B uploads a picture called 'me.jpg', person B's will overwrite the first upload.
Is there a way in Meioupload to change the filename as the picture is uploaded? E.g. add the person's username to the start so it would look like 'persona_me.jpg' and 'personb_me.jpg'?
This is the code I currently have:
var $actsAs = array('MeioUpload' => array(
'picture' => array(
'dir' => 'files/device_images',
'create_directory' => true,
'allowed_mime' => array('image/jpeg', 'image/pjpeg', 'image/gif', 'image/png'),
'allowed_ext' => array('.jpg', '.jpeg', '.png', '.gif'),
'thumbsizes' => array(
'small' => array('width'=>100, 'height'=>100),
'medium' => array('width'=>240, 'height'=>180),
'large' => array('width'=>640, 'height'=>480)
)));
Thanks for any help