Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Upload class and mime types for Office 2007 files
  • Just thought I'd mention that if you're trying to use the Upload class with mime_whitelist, Office 2007 files (those with extensions like docx, xlsx, etc.) are identified as mime type "application/zip" instead of "application/vnd.openxmlformats-officedocument.wordprocessingml.document" and
    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet." This makes some sense because they are essentially zip files. My workaround is to also white list mime type "application/zip." Unless someone can think of a better solution.
  • Pretty sure that's PHP doing that
  • Yes, didn't mean to imply it was a Fuel issue.
  • The Upload class uses PHP's fileinfo to detect the mimetype. It can't distinguish between a MS file and a zip file.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion