Linux News
The world is talking about GNU/Linux and Free/Open Source Software
Fixing OpenDocument MIME magic on Linux
When working on the beta of Officeshots.org I ran into an interesting problem with file type and MIME type detection of OpenDocument files. When a user uploads an ODF file to Officeshots I want to determine the MIME type myself using the PHP Fileinfo extension. On Linux, the PHP Fileinfo extension relies on the magic file that is provided by the file package. The magic file contains a series of tests that can determine the file type and MIME type of a file by its contents. I found out that the magic file is incomplete for OpenDocument files. In this article I will show you what is wrong with the magic file and how you can fix it.
|
|
Full Story |
Subject |
Topic Starter |
Replies |
Views |
Last Post |
excellent! |
tuxchick |
7 |
1,151 |
Jul 1, 2009 3:10 PM |
You cannot post until you login.