PHP upload (MIME)

Soldato
Joined
24 Nov 2002
Posts
16,378
Location
38.744281°N 104.846806°W
Below is an extract of the upload code I'm using... I modified it such that it accepts ".rar" and office 2007 files.... but it still doesn't work. I can't seem to find information on the MIME file types for the new xml office files. Any joy?

Code:
registered_types = array(
    "application/msword"            => ".doc",
    "application/pdf"            => ".pdf",
    "application/vnd.ms-powerpoint"            => ".ppt",
    "application/vnd.openxmlformats"            => ".docx, .pptx, .xlsx",
    "application/vnd.ms-excel"            => ".xls",
    "text/plain"                    => ".txt",
    "image/bmp"         => ".bmp",
    "application/x-zip-compressed"         => ".zip",
    "application/x-rar-compressed"         => ".rar",
    "image/gif"                 => ".gif",
    "image/pjpeg"                => ".jpg, .jpeg",
    "image/jpeg"                => ".jpg, .jpeg",

);

$allowed_types = array("application/msword","application/pdf","application/vnd.openxmlformats","application/vnd.ms-powerpoint","application/vnd.ms-excel","text/plain","image/bmp","image/gif","image/pjpeg","image/jpeg","application/x-zip-compressed","application/x-rar-compressed");
 
Back
Top Bottom