Sunday, May 29, 2011

How to configure MeioUpload Behavior for uploading any kind of files

Hi everyone.
I would like to use the MeioUpload Behavior for uploading any kind of
documents(I want it to accept every extension ).

It looks like I was finally able to upload other kind of files apart
from images,I had to write the options 'allowedMime' and 'allowedExt'
in camelCase (I don't know why because in the documentation they use
the underscore version 'allowed_mime', 'allowed_ext' :( ), but I
haven't been able to upload .zip files and most importantly I still
don't know how to tell the behaviour to accept anything.

var $actsAs = array(
'MeioUpload' => array(
'link_referencia' => array(
'dir' => 'files{DS}uploads',
'create_directory' => true,
'allowedMime' => array('application/pdf', 'application/
msword', 'application/vnd.ms-powerpoint', 'application/vnd.ms-excel',
'application/rtf', 'application/zip'),
'allowedExt' => array('.pdf', '.doc', '.ppt', '.xls',
'.rtf', '.zip'),
'default' => false,
)
)
);

Any help will be very much appreciated.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: