New MS-Office file types

Permalink
I have added in two new file types: docx and xlsx which are for Office 2007/2010 and Concrete seems to have issue serving these as when you are not an admin user, it wants to prompt to download as a zip file. The system seems to handle doc as a file type just fine. Did get the message from Franz that the file structuring is being modified a bit for 5.5.1.

Current: Concrete 5.5.0

Wierd...

Thanks,

Kent

kdyer
 
mesuva replied on at Permalink Best Answer Reply
mesuva
I think this is more of a webserver configuration issue rather than a concrete5 specific problem.

It comes down to MIMETYPES. These are set up on the server itself so that it understands how to serve up different kinds of files. I'm thinking that your server simply doesn't have mimetypes set up for docx, xlsx, pptx, etc. When it doesn't have a mimetype for a file, I think it just looks at the file itself and makes a guess. The new microsoft document formats ARE actually zip files, so that would explain why they are downloading that way.

Some webserver administration panels (like cPanel) allow you to set up new mimetypes. Sometimes you need to add entries to an .htaccess file, and sometimes you might need to contact your host to add them.

Have a look at the first and second posts of this forum thread:
http://www.webdeveloper.com/forum/showthread.php?threadid=162526...

The second post in particular is the most useful - adding those entries to your .htaccess file is likely to do the trick.
jordanlev replied on at Permalink Reply 1 Attachment
jordanlev
Just ran into this. Thanks to the helpful advice that @mesuva pointed to, I was able to figure this out. However, for some reason, setting the new mimetypes in the Apache .htaccess file didn't work (not sure why, something funky on the specific server I'm guessing)... so I overrode the Concrete5 core file that maps MIMETYPES to file extensions.

If you're running 5.6 or higher, you can place the "mime.php" file in the attached ZIP file in your site's top-level /helpers directory... it should just magically work then.

-Jordan