Using cake version 1.2.0.7692 RC3 it does not appear that the
MediaView class pays any attention to the apache mime types (nor
should it since this would be web server specific).  Acceptable mime
types in cake are hard coded in cake/libs/view/media.php.  Even with
the .xlsx extension defined (using AddType) in Apache the cake media
view will not allow downloads of this file extention until the
extension is added into the $mimeType array in the media.php file.

Is there another way to add mime types aside from extending this
class? Maybe this could become a feature request ticket?

Thanks!



On Nov 24, 10:43 am, sotin <[EMAIL PROTECTED]> wrote:
> Posted as a reply athttp://book.cakephp.org/view/489/Media-Views
>
> 2 - Acceptable MIME types are declared in web server
>
> For Apache the acceptable MIME types are given in [apache root]\conf
> \mime.types or alternatively you can specify in [apache root]\conf
> \httd.conf with AddType directive; e.g.
>
> AddType application/vnd.openxmlformats xlsx
>
> On Nov 24, 9:55 am, sotin <[EMAIL PROTECTED]> wrote:
>
> > I originally posted this question in the CakePHP documentation but
> > have moved it here for further discussion....
>
> > 1 - Modify acceptable mime types?
>
> > What is the best way to add an mime type to the 'acceptable' mime
> > types list? I haven't been able to find anything aside from editing
> > cake\libs\view\media.php, which I do not want to do for obvious
> > reasons. Extending the MediaView class also seems a little excessive
> > just to add one mime type.
>
> > I am trying to add xlsx download support (application/
> > vnd.openxmlformats)
>
> > Thanks!
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to