Hello all, I am using CakePHP 1.3 and Cake Media plugin (https://github.com/davidpersson/media).
With the default setting I am able to upload images and pdf. I tried to upload a .docx file and I am not able to upload it. Following is the validate rule in my Document model > <?php > > class Document extends AppModel { > > var $name = 'Document'; > > >> //media plugin behaviors > > var $actsAs = array( > > 'Media.Transfer', > > 'Media.Coupler', > > 'Media.Generator' > > ); > > >> var $validate = array( >> > 'file' => array( > > 'mimeType' => array( > > 'rule' => array('checkMimeType', false, array ( >> 'text/plain','application/pdf', > > 'application/msword', > > 'application/rtf',' >> application/vnd.openxmlformats-officedocument.wordprocessingml.document')) > > ), > > 'size' => array( > > 'rule' => array('checkSize' , '120M') > > ) > > )); > > > > } > > > I tried adding the "extension" values in my validate array but it did not work either. Let me know if I am missing something. Another question how do I retrieve the errors for failing to upload from the media plugin in my controller. Would $errors = $this->Document->invalidFields(); work? Regards James > -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php