• How can I add more allowed file extensions? 5 0 5 1
Currently:  

Author Topic: How can I add more allowed file extensions?  (Read 302527 times)

0 Members and 2 Guests are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
How can I add more allowed file extensions?
« on: April 07, 2005, 05:12:14 AM »
[UPDATE]
We have a plugin that can help: [Plugin] Valid file extensions manager
[/UPDATE]
[NOTICE]
If you are using 4images v1.7.8 make sure you applied this patch first: [1.7.8] Can't upload images with capital letters in extension(.JPG, .Png, etc)
[/NOTICE]

1) add your new file extensions in the settings Valid file extensions
2) try upload a file with your new extension.
    If no error message showed and file uploaded - you are all done :D

    If it gives you an error message, write down the mime type from the error message.
    For example possible error message when uploading .mp3 file:
Quote
Error uploading image file: example.mp3
example.mp3: Invalid file type (mp3, audio/mpg)
   In red (audio/mpg) is the mime type of the file.
    
    So, now you have the mime type. Open includes/upload_definitions.php search for $mime_type_match['ext'] where ext is your new extension (in our example the line would look like this):
Quote
$mime_type_match['mp3'] = array("audio/mpeg", "audio/x-mpeg", "audio/mp3");

    If you've found a line with your extension, then add the mime type from the error message, after a comma (dont forget use quotas)
    in our example the end result would look like this:
Quote
$mime_type_match['mp3'] = array("audio/mpeg", "audio/x-mpeg", "audio/mp3", "audio/mpg");

    If no line with your extension is present, then insert a new line at the end, above closing ?> with your extension and mime type:
Quote
$mime_type_match['mp3'] = array("audio/mpg");

3) Open templates/<your templates>/media/ folder. Make sure you have a template with name of your new extension. (in our example there should be mp3.html template)
    If there is none, then create one. I can not tell you what should be inside that template, because every extension must be handled differently, but you can look in other templates and see how they done it.

Upload definition mime_type list :

Code: [Select]
$mime_type_match['123'] = array("application/vnd.lotus-1-2-3", "application/lotus");
$mime_type_match['3dmf'] = array("x-world/x-3dmf");
$mime_type_match['3dml'] = array("text/vnd.in3d.3dml", "model/vnd.flatland.3dml", "text/vnd.in3d.3dml");
$mime_type_match['3gp'] = array("video/3gpp", "audio/3gpp");
$mime_type_match['a'] = array("application/octet-stream");
$mime_type_match['aab'] = array("application/x-authorware-bin");
$mime_type_match['aam'] = array("application/x-authorware-map");
$mime_type_match['aas'] = array("application/x-authorware-seg");
$mime_type_match['abc'] = array("text/vnd.abc");
$mime_type_match['acc'] = array("chemical/x-synopsys-accord");
$mime_type_match['acgi'] = array("text/html");
$mime_type_match['acu'] = array("application/vnd.acucobol");
$mime_type_match['aep'] = array("application/vnd.audiograph");
$mime_type_match['afl'] = array("video/animaflex");
$mime_type_match['afp'] = array("application/vnd.ibm.modcap");
$mime_type_match['ai'] = array("application/postscript");
$mime_type_match['aif'] = array("audio/aiff", "audio/x-aiff");
$mime_type_match['aifc'] = array("audio/x-aiff", "audio/aiff");
$mime_type_match['aiff'] = array("audio/x-aiff", "audio/aiff");
$mime_type_match['aim'] = array("application/x-aim");
$mime_type_match['aip'] = array("text/x-audiosoft-intra");
$mime_type_match['ani'] = array("application/x-navi-animation");
$mime_type_match['ano'] = array("application/x-annotator");
$mime_type_match['aos'] = array("application/x-nokia-9000-communicator-add-on-software");
$mime_type_match['apm'] = array("application/studiom");
$mime_type_match['apr'] = array("application/vnd.lotus-approach");
$mime_type_match['aps'] = array("application/mime");
$mime_type_match['arc'] = array("application/octet-stream");
$mime_type_match['arj'] = array("application/arj", "application/octet-stream");
$mime_type_match['art'] = array("image/x-jg");
$mime_type_match['asc'] = array("text/plain");
$mime_type_match['asd'] = array("application/astound");
$mime_type_match['asf'] = array("application/vnd.ms-asf", "video/x-ms-asf");
$mime_type_match['asm'] = array("text/x-asm");
$mime_type_match['asn'] = array("application/astound");
$mime_type_match['aso'] = array("application/vnd.accpac.simply.aso");
$mime_type_match['asp'] = array("application/x-asap", "text/asp");
$mime_type_match['asx'] = array("application/x-mplayer2", "video/x-ms-asf", "video/x-ms-asf-plugin");
$mime_type_match['au'] = array("audio/basic", "audio/x-au");
$mime_type_match['avb'] = array("application/octet-stream");
$mime_type_match['avi'] = array("video/quicktime", "application/x-troff-msvideo", "video/avi", "video/msvideo", "video/x-msvideo");
$mime_type_match['avs'] = array("video/avs-video");
$mime_type_match['avx'] = array("video/x-rad-screenplay");
$mime_type_match['bcpio'] = array("application/x-bcpio");
$mime_type_match['bh2'] = array("application/vnd.fujitsu.oasysprs");
$mime_type_match['bin'] = array("application/mac-binary", "application/macbinary", "application/octet-stream", "application/x-binary", "application/x-macbinary");
$mime_type_match['bld'] = array("application/bld");
$mime_type_match['bld2'] = array("application/bld2");
$mime_type_match['bm'] = array("image/bmp");
$mime_type_match['bmi'] = array("application/vnd.bmi");
$mime_type_match['bmp'] = array("image/bitmap", "image/bmp", "image/x-bmp", "image/x-windows-bmp");
$mime_type_match['boo'] = array("application/book");
$mime_type_match['book'] = array("application/book");
$mime_type_match['box'] = array("application/vnd.previewsystems.box");
$mime_type_match['boz'] = array("application/x-bzip2");
$mime_type_match['bpk'] = array("application/octet-stream");
$mime_type_match['bsh'] = array("application/x-bsh");
$mime_type_match['btf'] = array("image/prs.btif");
$mime_type_match['btif'] = array("image/prs.btif");
$mime_type_match['bz'] = array("application/x-bzip");
$mime_type_match['bz2'] = array("application/x-bzip2");
$mime_type_match['c'] = array("text/x-c", "text/plain");
$mime_type_match['c++'] = array("text/plain");
$mime_type_match['cal'] = array("image/x-cals");
$mime_type_match['cat'] = array("application/vnd.ms-pki.seccat");
$mime_type_match['cc'] = array("text/plain", "text/x-c");
$mime_type_match['ccad'] = array("application/clariscad");
$mime_type_match['ccn'] = array("application/x-cnc");
$mime_type_match['cco'] = array("application/x-cocoa");
$mime_type_match['cdf'] = array("application/cdf", "application/x-netcdf", "application/x-cdf");
$mime_type_match['cdkey'] = array("application/vnd.mediastation.cdkey");
$mime_type_match['cdx'] = array("chemical/x-cdx", "chemical/x-chem3d");
$mime_type_match['cer'] = array("application/pkix-cert", "application/x-x509-ca-cert");
$mime_type_match['cgi'] = array("magnus-internal/cgi");
$mime_type_match['cgm'] = array("image/cgm");
$mime_type_match['cha'] = array("application/x-chat");
$mime_type_match['chat'] = array("application/x-chat");
$mime_type_match['chm'] = array("chemical/x-chemdraw", "chemical/x-cs-chemdraw");
$mime_type_match['cif'] = array("chemical/x-cif");
$mime_type_match['cii'] = array("application/vnd.anser-web-certificate-issue-initiation");
$mime_type_match['cla'] = array("application/vnd.claymore");
$mime_type_match['class'] = array("application/java", "application/java-byte-code", "application/octet-stream", "application/x-java-class", "application/x-java.vm");
$mime_type_match['clp'] = array("application/x-msclip");
$mime_type_match['cmc'] = array("application/vnd.cosmocaller");
$mime_type_match['cmdf'] = array("chemical/x-cmdf");
$mime_type_match['cml'] = array("chemical/x-cml");
$mime_type_match['cmp'] = array("application/vnd.yellowriver-custom-menu");
$mime_type_match['cmx'] = array("application/x-cmx", "image/x-cmx");
$mime_type_match['cod'] = array("image/cis-cod");
$mime_type_match['com'] = array("text/plain", "application/octet-stream");
$mime_type_match['conf'] = array("text/plain");
$mime_type_match['config'] = array("application/x-ns-proxy-autoconfig");
$mime_type_match['cpio'] = array("application/x-cpio");
$mime_type_match['cpp'] = array("text/x-c");
$mime_type_match['cpt'] = array("application/mac-compactpro", "application/x-compactpro", "application/x-cpt");
$mime_type_match['crd'] = array("application/x-mscardfile");
$mime_type_match['crl'] = array("application/pkix-crl", "application/pkcs-crl");
$mime_type_match['crt'] = array("application/pkix-cert", "application/x-x509-ca-cert", "application/x-x509-user-cert");
$mime_type_match['csh'] = array("application/x-csh", "text/x-script.csh");
$mime_type_match['csm'] = array("chemical/x-csml");
$mime_type_match['csml'] = array("chemical/x-csml");
$mime_type_match['csp'] = array("application/vnd.commonspace");
$mime_type_match['css'] = array("text/css", "application/x-pointplus");
$mime_type_match['cst'] = array("application/vnd.commonspace");
$mime_type_match['cub'] = array("chemical/x-gaussian-cube");
$mime_type_match['curl'] = array("text/vnd.curl");
$mime_type_match['cw'] = array("application/prs.cww");
$mime_type_match['cww'] = array("application/prs.cww");
$mime_type_match['cxx'] = array("text/plain");
$mime_type_match['daf'] = array("application/vnd.Mobius.DAF");
$mime_type_match['dcm'] = array("x-lml/x-evm");
$mime_type_match['dcr'] = array("application/x-director");
$mime_type_match['dcx'] = array("image/x-dcx");
$mime_type_match['ddd'] = array("application/vnd.fujixerox.ddd");
$mime_type_match['deepv'] = array("application/x-deepv");
$mime_type_match['def'] = array("text/plain");
$mime_type_match['der'] = array("application/pkix-cert", "application/x-x509-ca-cert");
$mime_type_match['dib'] = array("image/bmp");
$mime_type_match['dic'] = array("text/plain");
$mime_type_match['dif'] = array("video/x-dv");
$mime_type_match['dir'] = array("application/x-director");
$mime_type_match['dis'] = array("application/vnd.Mobius.DIS");
$mime_type_match['dl'] = array("video/dl", "video/x-dl");
$mime_type_match['dll'] = array("application/x-msdownload");
$mime_type_match['dms'] = array("application/octet-stream");
$mime_type_match['dna'] = array("application/vnd.dna");
$mime_type_match['doc'] = array("application/msword");
$mime_type_match['dor'] = array("model/vnd.gdl", "model/vnd.gs.gdl");
$mime_type_match['dot'] = array("application/msword", "application/x-dot");
$mime_type_match['dp'] = array("application/commonground");
$mime_type_match['dpg'] = array("application/vnd.dpgraph");
$mime_type_match['dpgraph'] = array("application/vnd.dpgraph");
$mime_type_match['drw'] = array("application/drafting");
$mime_type_match['dsc'] = array("text/prs.lines.tag");
$mime_type_match['dtd'] = array("application/xml", "text/xml");
$mime_type_match['dump'] = array("application/octet-stream");
$mime_type_match['dv'] = array("video/x-dv");
$mime_type_match['dvi'] = array("application/x-dvi");
$mime_type_match['dwf'] = array("model/vnd.dwf", "drawing/x-dwf", "drawing/x-dwf");
$mime_type_match['dwg'] = array("image/vnd.dwg", "application/acad", "application/autocad", "image/vnd", "image/x-dwg");
$mime_type_match['dx'] = array("chemical/x-jcamp-dx");
$mime_type_match['dxf'] = array("image/vnd.dxf", "application/dxf", "image/x-dwg", "image/x-dxf");
$mime_type_match['dxr'] = array("application/vnd.dxr", "application/x-director");
$mime_type_match['ebk'] = array("application/x-expandedbook");
$mime_type_match['ecelp4800'] = array("audio/vnd.nuera.ecelp4800");
$mime_type_match['ecelp7470'] = array("audio/vnd.nuera.ecelp7470");
$mime_type_match['edm'] = array("application/vnd.novadigm.EDM");
$mime_type_match['edx'] = array("application/vnd.novadigm.EDX");
$mime_type_match['ei6'] = array("application/vnd.pg.osasli");
$mime_type_match['el'] = array("text/x-script.elisp");
$mime_type_match['elc'] = array("application/x-bytecode.elisp", "application/x-elc");
$mime_type_match['emb'] = array("chemical/x-embl-dl-nucleotide");
$mime_type_match['embl'] = array("chemical/x-embl-dl-nucleotide");
$mime_type_match['eml'] = array("message/rfc822");
$mime_type_match['enc'] = array("video/mpeg");
$mime_type_match['env'] = array("application/x-envoy");
$mime_type_match['eol'] = array("audio/vnd.digital-winds");
$mime_type_match['epb'] = array("application/x-epublisher");
$mime_type_match['eps'] = array("application/postscript");
$mime_type_match['es'] = array("application/x-esrehber", "audio/echospeech");
$mime_type_match['esl'] = array("audio/echospeech");
$mime_type_match['etc'] = array("application/x-earthtime");
$mime_type_match['etx'] = array("text/x-setext");
$mime_type_match['evm'] = array("x-lml/x-evm");
$mime_type_match['evy'] = array("application/envoy", "application/x-envoy");
$mime_type_match['exc'] = array("text/plain");
$mime_type_match['exe'] = array("application/octet-stream", "application/x-msdownload");
$mime_type_match['ext'] = array("application/vnd.novadigm.EXT");
$mime_type_match['ez'] = array("application/andrew-inset");
$mime_type_match['f'] = array("text/plain", "text/x-fortran");
$mime_type_match['f77'] = array("text/x-fortran");
$mime_type_match['f90'] = array("text/plain", "text/x-fortran");
$mime_type_match['faxmgr'] = array("application/x-fax-manager");
$mime_type_match['faxmgrjob'] = array("application/x-fax-manager-job");
$mime_type_match['fbs'] = array("image/vnd.fastbidsheet");
$mime_type_match['fdf'] = array("application/vnd.fdf");
$mime_type_match['fdml'] = array("text/html");
$mime_type_match['fg5'] = array("application/vnd.fujitsu.oasysgp");
$mime_type_match['fgd'] = array("application/x-director");
$mime_type_match['fh'] = array("image/x-freehand");
$mime_type_match['fh4'] = array("image/x-freehand");
$mime_type_match['fh5'] = array("image/x-freehand");
$mime_type_match['fh7'] = array("image/x-freehand");
$mime_type_match['fhc'] = array("image/x-freehand");
$mime_type_match['fif'] = array("application/fractals", "image/fif");
$mime_type_match['fli'] = array("video/fli", "video/x-fli");
$mime_type_match['flo'] = array("image/florian");
$mime_type_match['flx'] = array("text/vnd.fmi.flexstor", "text/html");
$mime_type_match['fly'] = array("text/vnd.fly");
$mime_type_match['fm'] = array("application/x-framemaker", "application/x-maker");
$mime_type_match['fmf'] = array("video/x-atomic3d-feature");
$mime_type_match['fml'] = array("application/file-mirror-list", "application/x-file-mirror-list");
$mime_type_match['for'] = array("text/plain", "text/x-fortran");
$mime_type_match['fp5'] = array("application/filemaker5");
$mime_type_match['fpx'] = array("application/vnd.netfpx", "image/vnd.fpx", "image/vnd.net-fpx", "image/x-fpx");
$mime_type_match['frame'] = array("application/x-framemaker");
$mime_type_match['frl'] = array("application/freeloader");
$mime_type_match['frm'] = array("application/vnd.ufdl", "application/vnd.xfdl", "application/x-framemaker");
$mime_type_match['fst'] = array("image/vnd.fst");
$mime_type_match['fti'] = array("application/vnd.anser-web-funds-transfer-initiation");
$mime_type_match['funk'] = array("audio/make");
$mime_type_match['fvi'] = array("video/isivideo");
$mime_type_match['fvt'] = array("video/vnd.fvt");
$mime_type_match['g'] = array("text/plain");
$mime_type_match['g3'] = array("image/g3fax");
$mime_type_match['gac'] = array("application/vnd.groove-account");
$mime_type_match['gau'] = array("chemical/x-gaussian-input");
$mime_type_match['gdb'] = array("x-lml/x-gdb");
$mime_type_match['gdl'] = array("model/vnd.gdl", "model/vnd.gs.gdl");
$mime_type_match['gif'] = array("image/gif");
$mime_type_match['gim'] = array("application/vnd.groove-identity-message");
$mime_type_match['gl'] = array("video/gl", "video/x-gl");
$mime_type_match['gph'] = array("application/vnd.FloGraphIt");
$mime_type_match['gps'] = array("application/x-gps");
$mime_type_match['gqf'] = array("application/vnd.grafeq");
$mime_type_match['gqs'] = array("application/vnd.grafeq");
$mime_type_match['grv'] = array("application/vnd.groove-injector");
$mime_type_match['gsd'] = array("audio/x-gsm");
$mime_type_match['gsm'] = array("model/vnd.gdl", "model/vnd.gs.gdl", "audio/x-gsm");
$mime_type_match['gsp'] = array("application/x-gsp");
$mime_type_match['gss'] = array("application/x-gss");
$mime_type_match['gtar'] = array("application/x-gtar");
$mime_type_match['gtm'] = array("application/vnd.froove-tool-message", "application/vnd.groove-tool-message");
$mime_type_match['gtp'] = array("application/bsi-gtp");
$mime_type_match['gtw'] = array("model/vnd.gtw");
$mime_type_match['gz'] = array("application/x-compressed", "application/x-gzip");
$mime_type_match['gzip'] = array("application/x-gzip", "multipart/x-gzip");
$mime_type_match['h'] = array("text/plain", "text/x-h");
$mime_type_match['hdf'] = array("application/x-hdf");
$mime_type_match['hdml'] = array("text/x-hdml");
$mime_type_match['help'] = array("application/x-helpfile");
$mime_type_match['hgl'] = array("application/vnd.hp-HPGL");
$mime_type_match['hh'] = array("text/plain", "text/x-h");
$mime_type_match['hlb'] = array("text/x-script");
$mime_type_match['hlp'] = array("application/hlp", "application/winhlp", "application/x-helpfile", "application/x-winhelp");
$mime_type_match['hpg'] = array("application/vnd.hp-HPGL");
$mime_type_match['hpgl'] = array("application/vnd.hp-HPGL");
$mime_type_match['hpi'] = array("application/vnd.hp-hpid");
$mime_type_match['hpid'] = array("application/vnd.hp-hpid");
$mime_type_match['hps'] = array("application/vnd.hp-hps");
$mime_type_match['hqx'] = array("application/mac-binhex40", "application/binhex", "application/binhex4", "application/mac-binhex", "application/x-binhex40", "application/x-mac-binhex40");
$mime_type_match['hta'] = array("application/hta");
$mime_type_match['htc'] = array("text/x-component");
$mime_type_match['htm'] = array("text/html");
$mime_type_match['html'] = array("text/html");
$mime_type_match['htmls'] = array("text/html");
$mime_type_match['htt'] = array("text/webviewhtml");
$mime_type_match['htx'] = array("text/html");
$mime_type_match['ic0'] = array("application/vnd.commerce-battelle");
$mime_type_match['ic1'] = array("application/vnd.commerce-battelle");
$mime_type_match['ic2'] = array("application/vnd.commerce-battelle");
$mime_type_match['ic3'] = array("application/vnd.commerce-battelle");
$mime_type_match['ic4'] = array("application/vnd.commerce-battelle");
$mime_type_match['ic5'] = array("application/vnd.commerce-battelle");
$mime_type_match['ic6'] = array("application/vnd.commerce-battelle");
$mime_type_match['ic7'] = array("application/vnd.commerce-battelle");
$mime_type_match['ic8'] = array("application/vnd.commerce-battelle");
$mime_type_match['ica'] = array("application/vnd.commerce-battelle");
$mime_type_match['icc'] = array("application/vnd.commerce-battelle");
$mime_type_match['icd'] = array("application/vnd.commerce-battelle");
$mime_type_match['ice'] = array("x-conference/x-cooltalk");
$mime_type_match['icf'] = array("application/vnd.commerce-battelle");
$mime_type_match['ico'] = array("image/x-icon");
$mime_type_match['idc'] = array("text/plain");
$mime_type_match['ief'] = array("image/ief");
$mime_type_match['iefs'] = array("image/ief");
$mime_type_match['ifm'] = array("application/vnd.shana.informed.formdata");
$mime_type_match['ifs'] = array("image/ifs");
$mime_type_match['iges'] = array("model/iges", "application/iges");
$mime_type_match['igs'] = array("model/iges", "application/iges");
$mime_type_match['iif'] = array("application/vnd.shana.informed.interchange");
$mime_type_match['iii'] = array("application/x-iphone");
$mime_type_match['ima'] = array("application/x-ima");
$mime_type_match['imap'] = array("application/x-httpd-imap");
$mime_type_match['imd'] = array("application/immedia");
$mime_type_match['imp'] = array("application/vnd.accpac.simply.imp");
$mime_type_match['ims'] = array("application/immedia");
$mime_type_match['inf'] = array("application/inf");
$mime_type_match['ins'] = array("application/x-NET-Install", "application/x-insight", "application/x-internet-signup");
$mime_type_match['insight'] = array("application/x-insight");
$mime_type_match['inst'] = array("application/x-install");
$mime_type_match['ip'] = array("application/x-ip2");
$mime_type_match['ipk'] = array("application/vnd.shana.informed.package");
$mime_type_match['ips'] = array("application/x-ipscript");
$mime_type_match['ipx'] = array("application/x-ipix");
$mime_type_match['ism'] = array("model/vnd.gdl", "model/vnd.gs.gdl");
$mime_type_match['isp'] = array("application/x-internet-signup");
$mime_type_match['ist'] = array("chemical/x-isostar");
$mime_type_match['istr'] = array("chemical/x-isostar");
$mime_type_match['isu'] = array("video/x-isvideo");
$mime_type_match['it'] = array("audio/it", "audio/x-mod");
$mime_type_match['itp'] = array("application/vnd.shana.informed.formtemp");
$mime_type_match['itz'] = array("audio/x-mod");
$mime_type_match['iv'] = array("application/x-inventor");
$mime_type_match['ivf'] = array("video/x-ivf");
$mime_type_match['ivr'] = array("i-world/i-vrml");
$mime_type_match['ivy'] = array("application/x-livescreen");
$mime_type_match['jad'] = array("text/vnd.sun.j2me.app-descriptor");
$mime_type_match['jam'] = array("audio/x-jam");
$mime_type_match['jar'] = array("application/java-archive", "application/x-java-archive");
$mime_type_match['jav'] = array("text/plain", "text/x-java-source");
$mime_type_match['java'] = array("text/plain", "text/x-java-source");
$mime_type_match['jcm'] = array("application/x-java-commerce");
$mime_type_match['jdx'] = array("chemical/x-jcamp-dx");
$mime_type_match['jfif'] = array("image/jpeg", "image/pjpeg");
$mime_type_match['jfif-tbnl'] = array("image/jpeg");
$mime_type_match['jpe'] = array("image/jpeg", "image/pjpeg");
$mime_type_match['jpeg'] = array("image/jpeg", "image/pjpeg");
$mime_type_match['jpg'] = array("image/jpeg", "image/pjpeg");
$mime_type_match['jps'] = array("image/x-jps");
$mime_type_match['js'] = array("application/x-javascript", "application/x-ns-proxy-autoconfig");
$mime_type_match['jut'] = array("image/jutvision");
$mime_type_match['jvs'] = array("application/x-ns-proxy-autoconfig");
$mime_type_match['jwc'] = array("application/jwc");
$mime_type_match['kar'] = array("audio/midi", "music/x-karaoke");
$mime_type_match['kin'] = array("chemical/x-kinemage");
$mime_type_match['ksh'] = array("application/x-ksh", "text/x-script.ksh");
$mime_type_match['la'] = array("audio/nspaudio", "audio/x-nspaudio");
$mime_type_match['lak'] = array("x-lml/x-lak");
$mime_type_match['lam'] = array("audio/x-liveaudio");
$mime_type_match['latex'] = array("application/x-latex");
$mime_type_match['lcc'] = array("application/fastman");
$mime_type_match['lcl'] = array("application/x-digitalloca");
$mime_type_match['lcr'] = array("application/x-digitalloca");
$mime_type_match['lgh'] = array("application/lgh");
$mime_type_match['lha'] = array("application/lha", "application/octet-stream", "application/x-lha");
$mime_type_match['lhx'] = array("application/octet-stream");
$mime_type_match['lic'] = array("application/x-enterlicense");
$mime_type_match['licmgr'] = array("application/x-licensemgr");
$mime_type_match['list'] = array("text/plain");
$mime_type_match['list3820'] = array("application/vnd.ibm.modcap");
$mime_type_match['listafp'] = array("application/vnd.ibm.modcap");
$mime_type_match['lma'] = array("audio/nspaudio", "audio/x-nspaudio");
$mime_type_match['lml'] = array("x-lml/x-lml");
$mime_type_match['lmlpack'] = array("x-lml/x-lmlpack");
$mime_type_match['lmp'] = array("model/vnd.gdl", "model/vnd.gs.gdl");
$mime_type_match['log'] = array("text/plain");
$mime_type_match['lsf'] = array("video/x-la-asf", "video/x-ms-asf");
$mime_type_match['lsp'] = array("application/x-lisp", "text/x-script.lisp");
$mime_type_match['lst'] = array("text/plain");
$mime_type_match['lsx'] = array("text/x-la-asf", "video/x-la-asf", "video/x-ms-asf");
$mime_type_match['ltx'] = array("application/x-latex");
$mime_type_match['lvp'] = array("audio/vnd.lucent.voice");
$mime_type_match['lwp'] = array("application/vnd.lotus-wordpro");
$mime_type_match['lzh'] = array("application/octet-stream", "application/x-lzh");
$mime_type_match['lzx'] = array("application/lzx", "application/octet-stream", "application/x-lzx");
$mime_type_match['m'] = array("text/plain", "text/x-m");
$mime_type_match['m13'] = array("application/x-msmediaview");
$mime_type_match['m14'] = array("application/x-msmediaview");
$mime_type_match['m1v'] = array("video/mpeg");
$mime_type_match['m2a'] = array("audio/mpeg");
$mime_type_match['m2v'] = array("video/mpeg");
$mime_type_match['m3a'] = array("audio/mpeg");
$mime_type_match['m3u'] = array("audio/mpegurl", "audio/x-mpegurl", "audio/x-mpequrl", "audio/x-scpls", "uadio/scpls");
$mime_type_match['ma'] = array("application/mathematica-old", "application/mathematica");
$mime_type_match['mag'] = array("application/vnd.ecowin.chart");
$mime_type_match['mail'] = array("application/x-mailfolder");
$mime_type_match['maker'] = array("application/x-framemaker");
$mime_type_match['man'] = array("application/x-troff-man");
$mime_type_match['map'] = array("application/x-navimap", "magnus-internal/imagemap");
$mime_type_match['mar'] = array("text/plain");
$mime_type_match['mb'] = array("application/mathematica-old", "application/mathematica");
$mime_type_match['mbd'] = array("application/mbedlet");
$mime_type_match['mbm'] = array("image/x-epoc-mbm");
$mime_type_match['mc$'] = array("application/x-magic-cap-package-1.0");
$mime_type_match['mcd'] = array("application/vnd.mcd", "application/vnd.vectorworks", "application/mcad", "application/x-mathcad");
$mime_type_match['mcf'] = array("image/vasa", "text/mcf");
$mime_type_match['mcm'] = array("chemical/x-macmolecule");
$mime_type_match['mcp'] = array("application/netmc");
$mime_type_match['mct'] = array("application/x-mascot");
$mime_type_match['mdb'] = array("application/msaccess", "application/x-msaccess");
$mime_type_match['mdz'] = array("audio/x-mod");
$mime_type_match['me'] = array("application/x-troff-me");
$mime_type_match['med'] = array("application/x-att-a2bmusic-pu");
$mime_type_match['mes'] = array("application/x-att-a2bmusic");
$mime_type_match['mesh'] = array("model/mesh");
$mime_type_match['mht'] = array("message/rfc822");
$mime_type_match['mhtml'] = array("message/rfc822");
$mime_type_match['mi'] = array("application/x-mif");
$mime_type_match['mid'] = array("application/x-midi", "audio/mid", "audio/midi", "audio/x-mid", "audio/x-midi", "music/crescendo", "x-music/x-midi");
$mime_type_match['midi'] = array("application/x-midi", "audio/midi", "audio/x-mid", "audio/x-midi", "music/crescendo", "x-music/x-midi");
$mime_type_match['mif'] = array("application/vnd.mif", "application/x-frame", "application/x-mif");
$mime_type_match['mil'] = array("image/x-cals");
$mime_type_match['mime'] = array("message/rfc822", "www/mime");
$mime_type_match['mio'] = array("audio/x-mio");
$mime_type_match['mjf'] = array("audio/x-vnd.AudioExplosion.MjuiceMediaFile");
$mime_type_match['mjpg'] = array("video/x-motion-jpeg");
$mime_type_match['ml5'] = array("application/ml5");
$mime_type_match['mm'] = array("application/base64", "application/x-meme");
$mime_type_match['mmd'] = array("chemical/x-macromodel", "chemical/x-macromodel-input");
$mime_type_match['mme'] = array("application/base64");
$mime_type_match['mmod'] = array("chemical/x-macromodel-input");
$mime_type_match['mmr'] = array("image/vnd.fujixerox.edmics-mmr");
$mime_type_match['mng'] = array("video/x-mng");
$mime_type_match['mny'] = array("application/x-msmoney");
$mime_type_match['moc'] = array("application/x-mocha");
$mime_type_match['mocha'] = array("application/x-mocha");
$mime_type_match['mod'] = array("audio/mod", "audio/x-mod");
$mime_type_match['mof'] = array("application/x-yumekara");
$mime_type_match['mol'] = array("chemical/x-mdl-molfile", "chemical/x-mdl-molfile");
$mime_type_match['moov'] = array("video/quicktime");
$mime_type_match['mop'] = array("chemical/x-mopac-input");
$mime_type_match['mov'] = array("video/quicktime");
$mime_type_match['movie'] = array("video/x-sgi-movie");
$mime_type_match['mp2'] = array("video/mpeg", "audio/mpeg", "audio/x-mpeg", "video/x-mpeg", "video/x-mpeg2a");
$mime_type_match['mp2a'] = array("audio/x-mpeg2");
$mime_type_match['mp2v'] = array("video/x-mpeg2");
$mime_type_match['mp3'] = array("video/mpeg", "audio/mp3", "audio/mpeg", "audio/mpeg3", "audio/mpg", "audio/x-mpeg", "audio/x-mpeg-3", "video/x-mpeg");
$mime_type_match['mp3url'] = array("audio/x-mpegurl");
$mime_type_match['mpa'] = array("video/mpeg", "audio/mpeg");
$mime_type_match['mpa2'] = array("audio/x-mpeg2");
$mime_type_match['mpc'] = array("application/x-project");
$mime_type_match['mpd'] = array("application/vnd.ms-project");
$mime_type_match['mpe'] = array("video/mpeg");
$mime_type_match['mpeg'] = array("video/mpeg");
$mime_type_match['mpf'] = array("text/vnd.ms-mediapackage", "text/vnd-mediapackage");
$mime_type_match['mpg'] = array("video/mpegaudio/mpeg");
$mime_type_match['mpga'] = array("audio/mpeg");
$mime_type_match['mpp'] = array("application/vnd.ms-project");
$mime_type_match['mps'] = array("application/x-mapserver", "video/x-mpeg-system");
$mime_type_match['mpt'] = array("application/vnd.ms-project", "application/x-project");
$mime_type_match['mpv'] = array("application/x-project", "video/mpeg");
$mime_type_match['mpv2'] = array("video/mpeg", "video/x-mpeg2");
$mime_type_match['mpx'] = array("application/x-project");
$mime_type_match['mpy'] = array("application/vnd.ibm.MiniPay");
$mime_type_match['mrc'] = array("application/marc");
$mime_type_match['mrl'] = array("text/x-mrml");
$mime_type_match['ms'] = array("application/x-troff-ms");
$mime_type_match['msf'] = array("application/vnd.epson.msf");
$mime_type_match['msh'] = array("model/mesh");
$mime_type_match['msl'] = array("application/vnd.Mobius.MSL");
$mime_type_match['msm'] = array("model/vnd.gdl", "model/vnd.gs.gdl");
$mime_type_match['mss'] = array("audio/mss");
$mime_type_match['msv'] = array("application/x-mystars-view");
$mime_type_match['mts'] = array("model/vnd.mts", "application/metastream");
$mime_type_match['mus'] = array("application/vnd.musician");
$mime_type_match['mv'] = array("video/x-sgi-movie");
$mime_type_match['mwc'] = array("application/vnd.dpgraph");
$mime_type_match['mxs'] = array("application/vnd.triscape.mxs");
$mime_type_match['my'] = array("audio/make");
$mime_type_match['mzz'] = array("application/x-vnd.AudioExplosion.mzz");
$mime_type_match['nap'] = array("image/naplps");
$mime_type_match['naplps'] = array("image/naplps");
$mime_type_match['nb'] = array("application/mathematica");
$mime_type_match['nc'] = array("application/x-netcdf");
$mime_type_match['nclk'] = array("text/html");
$mime_type_match['ncm'] = array("application/vnd.nokia.configuration-message");
$mime_type_match['ndb'] = array("x-lml/x-ndb");
$mime_type_match['ndl'] = array("application/vnd.lotus-notes");
$mime_type_match['nif'] = array("application/x-nif", "image/x-niff");
$mime_type_match['niff'] = array("image/x-niff");
$mime_type_match['nix'] = array("application/x-mix-transfer");
$mime_type_match['nls'] = array("text/nls");
$mime_type_match['nml'] = array("application/vnd.enliven");
$mime_type_match['nmz'] = array("application/x-scream");
$mime_type_match['nnd'] = array("application/vnd.noblenet-directory");
$mime_type_match['nns'] = array("application/vnd.noblenet-sealer");
$mime_type_match['nnw'] = array("application/vnd.noblenet-web");
$mime_type_match['npx'] = array("application/x-netfpx");
$mime_type_match['ns2'] = array("application/vnd.lotus-notes");
$mime_type_match['ns3'] = array("application/vnd.lotus-notes");
$mime_type_match['ns4'] = array("application/vnd.lotus-notes");
$mime_type_match['nsc'] = array("application/x-conference");
$mime_type_match['nsf'] = array("application/vnd.lotus-notes");
$mime_type_match['nsg'] = array("application/vnd.lotus-notes");
$mime_type_match['nsh'] = array("application/vnd.lotus-notes");
$mime_type_match['ntf'] = array("application/vnd.lotus-notes");
$mime_type_match['nvd'] = array("application/x-navidoc");
$mime_type_match['nvm'] = array("application/x-navimap");
$mime_type_match['nws'] = array("message/rfc822");
$mime_type_match['o'] = array("application/octet-stream");
$mime_type_match['oa2'] = array("application/vnd.fujitsu.oasys2");
$mime_type_match['oa3'] = array("application/vnd.fujitsu.oasys3");
$mime_type_match['oas'] = array("application/vnd.fujitsu.oasys");
$mime_type_match['obd'] = array("application/x-msbinder");
$mime_type_match['oda'] = array("application/oda");
$mime_type_match['omc'] = array("application/x-omc");
$mime_type_match['omcd'] = array("application/x-omcdatamaker");
$mime_type_match['omcr'] = array("application/x-omcregerator");
$mime_type_match['or2'] = array("application/vnd.lotus-organizer");
$mime_type_match['or3'] = array("application/vnd.lotus-organizer");
$mime_type_match['org'] = array("application/vnd.lotus-organizer");
$mime_type_match['orq'] = array("application/ocsp-request");
$mime_type_match['ors'] = array("application/ocsp-response");
$mime_type_match['ota'] = array("image/x-ota-bitmap");
$mime_type_match['p'] = array("text/x-pascal");
$mime_type_match['p10'] = array("application/pkcs10", "application/x-pkcs10");
$mime_type_match['p12'] = array("application/pkcs-12", "application/x-pkcs12");
$mime_type_match['p7a'] = array("application/x-pkcs7-signature");
$mime_type_match['p7b'] = array("application/x-pkcs7-certificates");
$mime_type_match['p7c'] = array("application/pkcs7-mime", "application/x-pkcs7-mime");
$mime_type_match['p7m'] = array("application/pkcs7-mime", "application/x-pkcs7-mime");
$mime_type_match['p7r'] = array("application/x-pkcs7-certreqresp");
$mime_type_match['p7s'] = array("application/pkcs7-signature");
$mime_type_match['pac'] = array("application/x-ns-proxy-autoconfig", "audio/x-pac");
$mime_type_match['pae'] = array("audio/x-epac");
$mime_type_match['pan'] = array("application/x-pan");
$mime_type_match['part'] = array("application/pro_eng");
$mime_type_match['pas'] = array("text/pascal");
$mime_type_match['pat'] = array("audio/x-pat");
$mime_type_match['pbd'] = array("application/vnd.powerbuilder6-s", "application/vnd.powerbuilder6", "application/vnd.powerbuilder7-s", "application/vnd.powerbuilder75-s", "application/vnd.powerbuilder75", "application/vnd.powerbuilder7");
$mime_type_match['pbm'] = array("image/x-portable-bitmap");
$mime_type_match['pcd'] = array("image/x-photo-cd");
$mime_type_match['pcl'] = array("application/vnd.hp-PCL", "application/x-pcl");
$mime_type_match['pct'] = array("image/x-pict");
$mime_type_match['pcx'] = array("image/x-pcx");
$mime_type_match['pda'] = array("image/x-pda");
$mime_type_match['pdb'] = array("chemical/x-pdb");
$mime_type_match['pdf'] = array("application/pdf");
$mime_type_match['pfr'] = array("application/font-tdpfr");
$mime_type_match['pfunk'] = array("audio/make", "audio/make.my.funk");
$mime_type_match['pfx'] = array("application/x-pkcs12");
$mime_type_match['pgm'] = array("image/x-portable-graymap", "image/x-portable-greymap");
$mime_type_match['pgn'] = array("application/x-chess-pgn");
$mime_type_match['pgp'] = array("application/pgp-encrypted");
$mime_type_match['pic'] = array("image/pict");
$mime_type_match['pict'] = array("image/pict", "image/x-pict");
$mime_type_match['pkg'] = array("application/x-newton-compatible-pkg");
$mime_type_match['pki'] = array("application/pkixcmp");
$mime_type_match['pko'] = array("application/vnd.ms-pki.pko");
$mime_type_match['pl'] = array("text/plain", "text/x-script.perl");
$mime_type_match['plc'] = array("application/vnd.Mobius.PLC");
$mime_type_match['plg'] = array("text/html");
$mime_type_match['plj'] = array("audio/vnd.everad.plj");
$mime_type_match['pls'] = array("audio/mpegurl", "audio/scpls", "audio/x-mpequrl", "audio/x-scpls", "audio/scpls");
$mime_type_match['plx'] = array("application/x-PiXCLscript");
$mime_type_match['pm'] = array("application/x-perl", "image/x-xpixmap", "text/x-script.perl-module");
$mime_type_match['pm4'] = array("application/x-pagemaker");
$mime_type_match['pm5'] = array("application/x-pagemaker");
$mime_type_match['pml'] = array("application/vnd.ctc-posml");
$mime_type_match['png'] = array("image/png", "image/x-png");
$mime_type_match['pnm'] = array("application/x-portable-anymap", "image/x-portable-anymap");
$mime_type_match['pot'] = array("application/vnd.ms-powerpoint", "application/mspowerpoint");
$mime_type_match['pov'] = array("model/x-pov");
$mime_type_match['ppa'] = array("application/vnd.ms-powerpoint");
$mime_type_match['ppm'] = array("image/x-portable-pixmap");
$mime_type_match['pps'] = array("application/vnd.ms-powerpoint", "application/mspowerpoint");
$mime_type_match['ppt'] = array("application/vnd.ms-powerpoint", "application/mspowerpoint", "application/powerpoint", "application/x-mspowerpoint");
$mime_type_match['ppz'] = array("application/mspowerpoint", "application/ppt");
$mime_type_match['pqf'] = array("application/x-cprplayer");
$mime_type_match['pqi'] = array("application/cprplayer");
$mime_type_match['pre'] = array("application/vnd.lotus-freelance", "application/x-freelance");
$mime_type_match['prf'] = array("application/pics-rules");
$mime_type_match['proxy'] = array("application/x-ns-proxy-autoconfig");
$mime_type_match['prt'] = array("application/pro_eng");
$mime_type_match['prz'] = array("application/vnd.lotus-freelance");
$mime_type_match['ps'] = array("application/postscript");
$mime_type_match['psd'] = array("application/octet-stream");
$mime_type_match['pseg3820'] = array("application/vnd.ibm.modcap");
$mime_type_match['psid'] = array("audio/prs.sid");
$mime_type_match['pti'] = array("image/prs.pti");
$mime_type_match['ptlk'] = array("application/listenup");
$mime_type_match['pub'] = array("application/x-mspublisher");
$mime_type_match['puz'] = array("application/x-crossword");
$mime_type_match['pvu'] = array("paleovu/x-pv");
$mime_type_match['pwn'] = array("application/vnd.3M.Post-it-Notes");
$mime_type_match['pwz'] = array("application/vnd.ms-powerpoint");
$mime_type_match['py'] = array("text/x-script.phyton");
$mime_type_match['pyc'] = array("applicaiton/x-bytecode.python");
$mime_type_match['qam'] = array("application/vnd.epson.quickanime");
$mime_type_match['qbo'] = array("application/vnd.intu.qbo");
$mime_type_match['qca'] = array("application/vnd.ericsson.quickcall");
$mime_type_match['qcall'] = array("application/vnd.ericsson.quickcall");
$mime_type_match['qcp'] = array("audio/vnd.qcelp");
$mime_type_match['qd3'] = array("x-world/x-3dmf");
$mime_type_match['qd3d'] = array("x-world/x-3dmf");
$mime_type_match['qfx'] = array("application/vnd.intu.qfx");
$mime_type_match['qif'] = array("image/x-quicktime");
$mime_type_match['qps'] = array("application/vnd.publishare-delta-tree");
$mime_type_match['qry'] = array("text/html");
$mime_type_match['qt'] = array("video/quicktime");
$mime_type_match['qtc'] = array("video/x-qtc");
$mime_type_match['qti'] = array("image/x-quicktime");
$mime_type_match['qtif'] = array("image/x-quicktime");
$mime_type_match['qtvr'] = array("video/quicktime");
$mime_type_match['r3t'] = array("text/vnd.rn-realtext3d");
$mime_type_match['ra'] = array("application/x-pn-realaudio", "audio/vnd.rn-realaudio", "audio/x-pn-realaudio", "audio/x-pn-realaudio-plugin", "audio/x-realaudio");
$mime_type_match['ram'] = array("application/x-pn-realaudio", "audio/x-pn-realaudio", "audio/x-pn-realaudio-plugin");
$mime_type_match['rar'] = array("application/x-rar-compressed", "application/octet-stream");
$mime_type_match['ras'] = array("application/x-cmu-raster", "image/cmu-raster", "image/x-cmu-raster");
$mime_type_match['rast'] = array("image/cmu-raster");
$mime_type_match['rb'] = array("application/x-rocketbook");
$mime_type_match['rct'] = array("application/prs.nprend");
$mime_type_match['rep'] = array("application/vnd.businessobjects");
$mime_type_match['rexx'] = array("text/x-script.rexx");
$mime_type_match['rf'] = array("image/vnd.rn-realflash");
$mime_type_match['rgb'] = array("image/x-rgb");
$mime_type_match['rjs'] = array("application/vnd.rn-realsystem-rjs");
$mime_type_match['rlc'] = array("image/vnd.fujixerox.edmics-rlc");
$mime_type_match['rlf'] = array("application/x-richlink");
$mime_type_match['rm'] = array("application/vnd.rn-realmedia", "application/x-pn-realaudio", "audio/x-pn-realaudio", "audio/x-pn-realaudio-plugin");
$mime_type_match['rmi'] = array("audio/mid");
$mime_type_match['rmm'] = array("audio/x-pn-realaudio");
$mime_type_match['rmp'] = array("application/vnd.rn-rn_music_package", "audio/x-pn-realaudio", "audio/x-pn-realaudio-plugin");
$mime_type_match['rmx'] = array("application/vnd.rn-realsystem-rmx");
$mime_type_match['rnd'] = array("application/prs.nprend");
$mime_type_match['rng'] = array("application/ringing-tones", "application/vnd.nokia.ringing-tone");
$mime_type_match['rnx'] = array("application/vnd.rn-realplayer");
$mime_type_match['roff'] = array("application/x-troff");
$mime_type_match['rp'] = array("image/vnd.rn-realpix");
$mime_type_match['rpm'] = array("application/x-pn-realaudio", "audio/x-pn-RealAudio-plugin", "audio/x-pn-realaudio-plugin");
$mime_type_match['rsm'] = array("model/vnd.gdl", "model/vnd.gs.gdl");
$mime_type_match['rsml'] = array("application/vnd.rn-rsml");
$mime_type_match['rt'] = array("text/richtext", "text/vnd.rn-realtext");
$mime_type_match['rte'] = array("x-lml/x-gps");
$mime_type_match['rtf'] = array("text/richtext", "application/msword", "application/rtf", "application/x-rtf", "text/rtf");
$mime_type_match['rtg'] = array("application/metastream");
$mime_type_match['rts'] = array("application/x-rtsl");
$mime_type_match['rtx'] = array("text/richtext", "application/rtf");
$mime_type_match['rv'] = array("video/vnd.rn-realvideo");
$mime_type_match['rxn'] = array("chemical/x-mdl-rxn", "chemical/x-mdl-rxnfile");
$mime_type_match['s'] = array("text/x-asm");
$mime_type_match['s3m'] = array("audio/s3m", "audio/x-mod");
$mime_type_match['s3z'] = array("audio/x-mod");
$mime_type_match['sam'] = array("application/vnd.lotus-wordpro");
$mime_type_match['saveme'] = array("application/octet-stream");
$mime_type_match['sbk'] = array("application/x-tbook", "audio/x-sbk");
$mime_type_match['sc'] = array("application/x-showcase");
$mime_type_match['scd'] = array("application/x-msschedule");
$mime_type_match['scm'] = array("application/vnd.lotus-screencam", "application/x-lotusscreencam", "text/x-script.guile", "text/x-script.scheme", "video/x-scm");
$mime_type_match['scp'] = array("text/plain");
$mime_type_match['sct'] = array("text/scriptlet");
$mime_type_match['sdf'] = array("application/e-score", "chemical/x-mdl-sdf");
$mime_type_match['sdml'] = array("text/plain");
$mime_type_match['sdp'] = array("application/sdp", "application/x-sdp");
$mime_type_match['sdr'] = array("application/sounder");
$mime_type_match['sds'] = array("application/x-onlive");
$mime_type_match['sea'] = array("application/sea", "application/x-sea", "application/x-stuffit");
$mime_type_match['see'] = array("application/vnd.seemail");
$mime_type_match['ser'] = array("application/x-java-serialized-object");
$mime_type_match['set'] = array("application/set");
$mime_type_match['sgi-lpr'] = array("application/x-sgi-lpr");
$mime_type_match['sgm'] = array("text/sgml", "text/x-sgml");
$mime_type_match['sgml'] = array("text/sgml", "text/x-sgml");
$mime_type_match['sh'] = array("application/x-bsh", "application/x-sh", "application/x-shar", "text/x-script.sh");
$mime_type_match['sha'] = array("application/x-shar");
$mime_type_match['shar'] = array("application/x-bsh", "application/x-shar");
$mime_type_match['sho'] = array("application/x-showcase");
$mime_type_match['show'] = array("application/x-showcase");
$mime_type_match['showcase'] = array("application/x-showcase");
$mime_type_match['shtml'] = array("text/html", "magnus-internal/parsed-html", "text/x-server-parsed-html");
$mime_type_match['shw'] = array("application/presentations");
$mime_type_match['si'] = array("text/vnd.wap.si");
$mime_type_match['sic'] = array("application/vnd.wap.sic");
$mime_type_match['sid'] = array("audio/prs.sid", "audio/x-psid");
$mime_type_match['silo'] = array("model/mesh");
$mime_type_match['sis'] = array("application/vnd.symbian.install");
$mime_type_match['sit'] = array("application/x-sit", "application/x-stuffit");
$mime_type_match['skc'] = array("chemical/x-mdl-isis");
$mime_type_match['skd'] = array("application/vnd.koan", "application/x-koan");
$mime_type_match['skm'] = array("application/vnd.koan", "application/x-koan");
$mime_type_match['skp'] = array("application/vnd.koan", "application/x-koan");
$mime_type_match['skt'] = array("application/vnd.koan", "application/x-koan");
$mime_type_match['sl'] = array("text/vnd.wap.sl", "application/x-seelogo");
$mime_type_match['slc'] = array("application/vnd.wap.slc", "application/x-salsa");
$mime_type_match['slides'] = array("application/x-showcase");
$mime_type_match['slt'] = array("application/vnd.epson.salt");
$mime_type_match['smd'] = array("chemical/x-smd");
$mime_type_match['smi'] = array("application/smil", "chemical/x-daylight-smiles", "chemical/x-x-daylight-smiles");
$mime_type_match['smil'] = array("application/smil");
$mime_type_match['smp'] = array("application/studiom");
$mime_type_match['snd'] = array("audio/basic", "audio/x-adpcm");
$mime_type_match['sol'] = array("application/solids");
$mime_type_match['spc'] = array("application/x-pkcs7-certificates", "chemical/x-galactic-spc", "text/x-speech");
$mime_type_match['spl'] = array("application/futuresplash", "application/x-futuresplash");
$mime_type_match['spo'] = array("text/vnd.in3d.spot");
$mime_type_match['spot'] = array("text/vnd.in3d.spot");
$mime_type_match['spr'] = array("application/x-sprite");
$mime_type_match['sprite'] = array("application/x-sprite");
$mime_type_match['spt'] = array("application/x-spt");
$mime_type_match['src'] = array("application/x-wais-source");
$mime_type_match['ssf'] = array("application/vnd.epson.ssf");
$mime_type_match['ssi'] = array("text/x-server-parsed-html");
$mime_type_match['ssm'] = array("application/streamingmedia");
$mime_type_match['sst'] = array("application/vnd.ms-pki.certstore");
$mime_type_match['step'] = array("application/step");
$mime_type_match['stf'] = array("application/vnd.wt.stf");
$mime_type_match['stk'] = array("application/hyperstudio");
$mime_type_match['stl'] = array("application/sla", "application/vnd.ms-pki.stl", "application/x-navistyle");
$mime_type_match['stp'] = array("application/step");
$mime_type_match['str'] = array("application/vnd.pg.format", "audio/x-str");
$mime_type_match['sv4cpio'] = array("application/x-sv4cpio");
$mime_type_match['sv4crc'] = array("application/x-sv4crc");
$mime_type_match['svf'] = array("image/vnd.svf", "image/vnd", "image/x-dwg");
$mime_type_match['svg'] = array("image/svg-xml");
$mime_type_match['svh'] = array("image/svh");
$mime_type_match['svr'] = array("application/x-world", "x-world/x-svr");
$mime_type_match['swf'] = array("application/x-shockwave-flash");
$mime_type_match['swfl'] = array("application/x-shockwave-flash");
$mime_type_match['sys'] = array("video/x-mpeg-system");
$mime_type_match['t'] = array("application/x-troff");
$mime_type_match['tad'] = array("application/octet-stream");
$mime_type_match['tag'] = array("text/prs.lines.tag");
$mime_type_match['talk'] = array("plugin/talker", "text/x-speech", "x-plugin/x-talker");
$mime_type_match['tar'] = array("appliation/x-tar", "application/x-tar");
$mime_type_match['tardist'] = array("application/x-tardist");
$mime_type_match['taz'] = array("application/x-tar");
$mime_type_match['tbk'] = array("application/toolbook", "application/x-tbook");
$mime_type_match['tbp'] = array("application/x-timbuktu");
$mime_type_match['tbt'] = array("application/timbuktu");
$mime_type_match['tcl'] = array("application/x-tcl", "text/x-script.tcl");
$mime_type_match['tcsh'] = array("text/x-script.tcsh");
$mime_type_match['tex'] = array("application/x-tex");
$mime_type_match['texi'] = array("application/x-tex", "application/x-texinfo");
$mime_type_match['texinfo'] = array("application/x-texinfo");
$mime_type_match['text'] = array("text/plain", "application/plain", "application/text");
$mime_type_match['tgf'] = array("chemical/x-mdl-tgf");
$mime_type_match['tgz'] = array("application/gnutar", "application/x-compressed", "application/x-tar");
$mime_type_match['tif'] = array("image/tiff", "image/x-tiff");
$mime_type_match['tiff'] = array("image/tiff", "image/x-tiff");
$mime_type_match['tki'] = array("application/x-tkined");
$mime_type_match['tkined'] = array("application/x-tkined");
$mime_type_match['toc'] = array("application/toc");
$mime_type_match['tpl'] = array("application/vnd.groove-tool-template");
$mime_type_match['tr'] = array("application/x-troff");
$mime_type_match['tra'] = array("application/vnd.trueapp");
$mime_type_match['trk'] = array("x-lml/x-gps");
$mime_type_match['trm'] = array("application/x-msterminal");
$mime_type_match['tsi'] = array("audio/tsp-audio", "audio/tsplayer");
$mime_type_match['tsp'] = array("application/dsptype", "audio/tsplayer");
$mime_type_match['tsv'] = array("text/tab-separated-values");
$mime_type_match['ttf'] = array("application/octet-stream");
$mime_type_match['ttz'] = array("application/t-time");
$mime_type_match['turbot'] = array("image/florian");
$mime_type_match['tvm'] = array("application/x-tvml");
$mime_type_match['tvml'] = array("application/x-tvml");
$mime_type_match['txf'] = array("application/vnd.Mobius.TXF");
$mime_type_match['txt'] = array("text/plain", "application/text");
$mime_type_match['ufdl'] = array("application/vnd.ufdl");
$mime_type_match['uil'] = array("text/x-uil");
$mime_type_match['uni'] = array("text/uri-list");
$mime_type_match['unis'] = array("text/uri-list");
$mime_type_match['unv'] = array("application/i-deas");
$mime_type_match['uri'] = array("text/uri-list");
$mime_type_match['uris'] = array("text/uri-list");
$mime_type_match['urls'] = array("application/x-url-list");
$mime_type_match['ustar'] = array("application/x-ustar", "multipart/x-ustar");
$mime_type_match['uu'] = array("application/octet-stream", "application/uue", "text/x-uuencode");
$mime_type_match['uue'] = array("application/uue", "text/x-uuencode");
$mime_type_match['v5d'] = array("application/vis5d");
$mime_type_match['vbk'] = array("audio/vnd.nortel.vbk");
$mime_type_match['vbox'] = array("application/vnd.previewsystems.box");
$mime_type_match['vcd'] = array("application/x-cdlink");
$mime_type_match['vcf'] = array("text/x-vcard");
$mime_type_match['vcg'] = array("application/vnd.groove-vcard");
$mime_type_match['vcs'] = array("text/x-vCalendar");
$mime_type_match['vcx'] = array("application/vnd.vcx");
$mime_type_match['vda'] = array("application/vda");
$mime_type_match['vdo'] = array("video/vdo");
$mime_type_match['vew'] = array("application/vnd.lotus-approach", "application/groupwise");
$mime_type_match['vis'] = array("application/vnd.informix-visionary");
$mime_type_match['viv'] = array("video/vnd.vivo", "video/vivo");
$mime_type_match['vivo'] = array("video/vnd.vivo", "video/vivo");
$mime_type_match['vmd'] = array("application/vocaltec-media-desc", "chemical/x-vmd");
$mime_type_match['vmf'] = array("application/vocaltec-media-file");
$mime_type_match['vmi'] = array("application/x-dremacast-vms-info");
$mime_type_match['vms'] = array("application/x-dremacast-vms");
$mime_type_match['voc'] = array("audio/voc", "audio/x-voc");
$mime_type_match['vos'] = array("video/vosaic");
$mime_type_match['vox'] = array("audio/voxware");
$mime_type_match['vqe'] = array("audio/x-twinvq-plugin");
$mime_type_match['vqf'] = array("audio/x-twinvq");
$mime_type_match['vql'] = array("audio/x-twinvq", "audio/x-twinvq-plugin");
$mime_type_match['vre'] = array("x-world/x-vream");
$mime_type_match['vrj'] = array("x-world/x-vrt");
$mime_type_match['vrml'] = array("model/vrml", "application/x-vrml", "x-world/x-vrml");
$mime_type_match['vrt'] = array("x-world/x-vrt");
$mime_type_match['vrw'] = array("x-world/x-vream");
$mime_type_match['vsd'] = array("application/vnd.visio", "application/x-visio");
$mime_type_match['vsl'] = array("application/x-cnet-vsl");
$mime_type_match['vss'] = array("application/vnd.visio");
$mime_type_match['vst'] = array("application/vnd.visio", "application/x-visio");
$mime_type_match['vsw'] = array("application/vnd.visio", "application/x-visio");
$mime_type_match['vts'] = array("workbook/formulaone");
$mime_type_match['vtu'] = array("model/vnd.vtu");
$mime_type_match['w60'] = array("application/wordperfect6.0");
$mime_type_match['w61'] = array("application/wordperfect6.1");
$mime_type_match['w6w'] = array("application/msword");
$mime_type_match['wav'] = array("application/x-wav", "audio/wav", "audio/x-wav");
$mime_type_match['wax'] = array("audio/x-ms-wax");
$mime_type_match['wb1'] = array("application/x-qpro");
$mime_type_match['wbc'] = array("application/x-webshots");
$mime_type_match['wbmp'] = array("image/vnd.wap.wbmp");
$mime_type_match['wbxml'] = array("application/vnd.wap.sic", "application/vnd.wap.slc", "application/vnd.wap.wbxml", "application/vnd.wap.wmlc");
$mime_type_match['web'] = array("application/vnd.xara");
$mime_type_match['wi'] = array("image/wavelet");
$mime_type_match['win'] = array("model/vnd.gdl", "model/vnd.gs.gdl");
$mime_type_match['wiz'] = array("application/msword");
$mime_type_match['wk1'] = array("application/vnd.lotus-1-2-3", "application/x-123");
$mime_type_match['wk3'] = array("application/vnd.lotus-1-2-3");
$mime_type_match['wk4'] = array("application/vnd.lotus-1-2-3");
$mime_type_match['wkz'] = array("application/x-wingz");
$mime_type_match['wm'] = array("video/x-ms-asf");
$mime_type_match['wma'] = array("audio/x-ms-wma");
$mime_type_match['wmf'] = array("application/x-msmetafile", "image/x-wmf", "windows/metafile");
$mime_type_match['wml'] = array("text/vnd.wap.wml");
$mime_type_match['wmlc'] = array("application/vnd.wap.wmlc");
$mime_type_match['wmls'] = array("text/vnd.wap.wmlscript");
$mime_type_match['wmlsc'] = array("application/vnd.wap.wmlscriptc");
$mime_type_match['wmv'] = array("video/x-ms-wmv");
$mime_type_match['wmx'] = array("video/x-ms-wmx");
$mime_type_match['word'] = array("application/msword");
$mime_type_match['wp'] = array("application/wordperfect");
$mime_type_match['wp5'] = array("application/wordperfect", "application/wordperfect6.0");
$mime_type_match['wp6'] = array("application/wordperfect");
$mime_type_match['wpd'] = array("application/wordperfect", "application/x-wpwin");
$mime_type_match['wpt'] = array("x-lml/x-gps");
$mime_type_match['wq1'] = array("application/x-lotus");
$mime_type_match['wri'] = array("application/mswrite", "application/x-mswrite", "application/x-wri");
$mime_type_match['wrl'] = array("model/vrml", "application/x-world", "i-world/i-vrml", "x-world/x-vrml");
$mime_type_match['wrz'] = array("model/vrml", "x-world/x-vrml");
$mime_type_match['wsc'] = array("text/sgml", "text/scriptlet");
$mime_type_match['wsrc'] = array("application/x-wais-source");
$mime_type_match['wtb'] = array("application/vnd.webturbo");
$mime_type_match['wtk'] = array("application/x-wintalk");
$mime_type_match['wtx'] = array("text/plain");
$mime_type_match['wv'] = array("video/wavelet");
$mime_type_match['wvx'] = array("video/x-ms-wvx");
$mime_type_match['wxl'] = array("application/x-wxl");
$mime_type_match['x3d'] = array("application/vnd.hzn-3d-crossword");
$mime_type_match['xar'] = array("application/vnd.xara", "application/vnd.xara");
$mime_type_match['xbd'] = array("application/vnd.fujixerox.docuworks.binder");
$mime_type_match['xbm'] = array("image/x-xbitmap", "image/x-xbm", "image/xbm");
$mime_type_match['xdm'] = array("application/x-xdma");
$mime_type_match['xdma'] = array("application/x-xdma");
$mime_type_match['xdr'] = array("video/x-amt-demorun");
$mime_type_match['xdw'] = array("application/vnd.fujixerox.docuworks");
$mime_type_match['xfdl'] = array("application/vnd.xfdl");
$mime_type_match['xgz'] = array("xgl/drawing");
$mime_type_match['xif'] = array("image/vnd.xiff");
$mime_type_match['xl'] = array("application/excel");
$mime_type_match['xla'] = array("application/excel", "application/vnd.ms-excel", "application/x-excel", "application/x-msexcel");
$mime_type_match['xlb'] = array("application/vnd.ms-excel", "application/excel", "application/x-excel");
$mime_type_match['xlc'] = array("application/vnd.ms-excel", "application/excel", "application/x-excel");
$mime_type_match['xld'] = array("application/excel", "application/x-excel");
$mime_type_match['xlk'] = array("application/excel", "application/x-excel");
$mime_type_match['xll'] = array("application/vnd.ms-excel", "application/excel", "application/x-excel");
$mime_type_match['xlm'] = array("application/vnd.ms-excel", "application/excel", "application/x-excel");
$mime_type_match['xls'] = array("application/vnd.ms-excel", "application/excel", "application/x-excel", "application/x-msexcel");
$mime_type_match['xlt'] = array("application/excel", "application/vnd.ms-excel", "application/x-excel");
$mime_type_match['xlv'] = array("application/excel", "application/x-excel");
$mime_type_match['xlw'] = array("application/vnd.ms-excel", "application/excel", "application/x-excel", "application/x-msexcel");
$mime_type_match['xm'] = array("audio/x-mod", "audio/xm");
$mime_type_match['xml'] = array("application/xml", "text/vnd.IPTC.NITF", "text/vnd.IPTC.NewsML", "text/vnd.wap.si", "text/vnd.wap.sl", "text/vnd.wap.wml", "text/xml");
$mime_type_match['xmz'] = array("audio/x-mod", "xgl/movie");
$mime_type_match['x-png'] = array("image/png");
$mime_type_match['xpix'] = array("application/x-vnd.ls-xpix");
$mime_type_match['xpm'] = array("image/x-xpixmap", "image/x-xpm", "image/xpm");
$mime_type_match['xpr'] = array("application/vnd.is-xpr");
$mime_type_match['xpw'] = array("application/vnd.intercon.formnet");
$mime_type_match['xpx'] = array("application/vnd.intercon.formnet");
$mime_type_match['xsl'] = array("text/xml", "text/xsl");
$mime_type_match['xsr'] = array("video/x-amt-showrun");
$mime_type_match['xul'] = array("text/xul");
$mime_type_match['xwd'] = array("image/x-xwd", "image/x-xwindowdump");
$mime_type_match['xyz'] = array("chemical/x-pdb", "chemical/x-xyz");
$mime_type_match['yz1'] = array("application/x-yz1");
$mime_type_match['Z'] = array("application/x-compressed");
$mime_type_match['zac'] = array("application/x-zaurus-zac");
$mime_type_match['zip'] = array("application/zip", "application/x-compressed", "application/x-zip-compressed", "multipart/x-zip");
$mime_type_match['zoo'] = array("application/octet-stream");
$mime_type_match['zsh'] = array("text/x-script.zsh");
$mime_type_match['ztardist'] = array("application/x-ztardist");



Original file list by excitex2 :
http://www.4homepages.de/forum/index.php?topic=15253.0
Thanks to excitex2

4) create a new icon .gif icon in templates/<your templates>/icons/ (in our example it should be mp3.gif)
this icon will be showed for the files that don't have thumbnails.



Sometimes you might receive an error without any MIME type i.e.
Quote
Invalid file type: (flv, )
In that case you must add an empty string:
Quote
$mime_type_match['flv'] = array("video/x-flv", "");
« Last Edit: October 07, 2010, 01:31:26 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Midnight Raven

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #1 on: August 03, 2005, 12:31:23 AM »
Hello~I have followed your instructions carefully.

I get a lot of errors in the panel when I go to add a new image, plus the file extension still does not work.

I am trying to make extensions for .psp .tub & .pfr

Would you be able to explain how to do this ~ possibly the information that would go into the template ~ which you indicated that we would need to look at the other templates to see what would go there.  I've done that and copied and pasted what I thought would best fit for these extensions.

Thank you.
Raven

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #2 on: August 03, 2005, 12:37:00 AM »
I get a lot of errors in the panel when I go to add a new image, plus the file extension still does not work.

I am trying to make extensions for .psp .tub & .pfr

Would you be able to explain how to do this
There is nothing more to explain and knowing the error messages are helpfull in 99 out of 100 cases ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Midnight Raven

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #3 on: August 03, 2005, 12:48:02 AM »
After I follow your instructions ~ I get these errors when I go to add an image:

Warning: Cannot modify header information - headers already sent by (output started at /home/midnight/public_html/gallery/includes/upload_definitions.php:106) in /home/midnight/public_html/gallery/admin/admin_functions.php on line 168

Warning: Cannot modify header information - headers already sent by (output started at /home/midnight/public_html/gallery/includes/upload_definitions.php:106) in /home/midnight/public_html/gallery/admin/admin_functions.php on line 169

Warning: Cannot modify header information - headers already sent by (output started at /home/midnight/public_html/gallery/includes/upload_definitions.php:106) in /home/midnight/public_html/gallery/admin/admin_functions.php on line 170

Warning: Cannot modify header information - headers already sent by (output started at /home/midnight/public_html/gallery/includes/upload_definitions.php:106) in /home/midnight/public_html/gallery/admin/admin_functions.php on line 171

Warning: Cannot modify header information - headers already sent by (output started at /home/midnight/public_html/gallery/includes/upload_definitions.php:106) in /home/midnight/public_html/gallery/admin/admin_functions.php on line 172

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #4 on: August 03, 2005, 12:54:15 AM »
http://www.4homepages.de/forum/index.php?topic=3378.0

and please follow the three steps in my signature ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Midnight Raven

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #5 on: August 03, 2005, 01:03:04 AM »
Thank you ~ I should have known that lol ~ I deal with scripts all day ~ but not these type.

Well, that fixed that problem, but it won't allow me to upload the image with the .psp extension.

I get this error:      Error uploading image file: Fallen Gizmo Design.psp
Fallen___Gizmo_Design.psp: Invalid file type (psp, application/octet-stream)

No database entry!


Do I need to use different coding in the template?


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How can I add more allowed file extensions?
« Reply #6 on: August 03, 2005, 01:04:57 AM »
seems like u didnt read very carefuly, because this exact situation is explained in the tutorial ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Midnight Raven

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #7 on: August 03, 2005, 02:55:36 AM »
I read it very carefully lol ~ bad thing is I'm trying to do 15 things at once and I didn't fully understand.

Got it now ~ lol.  Could probably just delete out all my posts because your tut does make sense ~ ppl
just have to have their mind on one thing while doing it. lol

Thanks for all your help.

Offline we_scooter

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • http://www.alqassim.org
Re: How can I add more allowed file extensions?
« Reply #8 on: September 18, 2005, 12:04:20 AM »
hi
I have done the thing with upload defeinition and still cant upload files they all give ectet/stream error
what should i do ,

look at my attachement for the file I edited :oops:

Offline Xyu BAM

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #9 on: September 18, 2005, 09:02:37 AM »
exact error please

Offline we_scooter

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • http://www.alqassim.org
Re: How can I add more allowed file extensions?
« Reply #10 on: September 19, 2005, 02:45:18 AM »
this is the error
Code: [Select]
Error uploading image file:
yahoo.wav: Invalid file type (wav, audio/wav)


Offline Xyu BAM

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #11 on: September 19, 2005, 02:50:09 AM »
so where is audio/wav in this line?
Code: [Select]
$mime_type_match['wav'] = array("audio/x-wav");Perhaps you should re-read the tutorial ones more ;)

Offline we_scooter

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • http://www.alqassim.org
Re: How can I add more allowed file extensions?
« Reply #12 on: September 19, 2005, 03:07:20 AM »
upload_definition file content: by default nothing edited


Code: [Select]
$mime_type_match['jpg'] = array("image/jpg", "image/jpeg", "image/pjpeg");
$mime_type_match['jpeg'] = array("image/jpg", "image/jpeg", "image/pjpeg");

$mime_type_match['gif'] = array("image/gif");

$mime_type_match['png'] = array("image/png", "image/x-png");

$mime_type_match['tif'] = array("image/tiff", "application/octet-stream");
$mime_type_match['tiff'] = array("image/tiff", "application/octet-stream");

$mime_type_match['bmp'] = array("image/bmp", "image/x-ms-bmp");

$mime_type_match['aif'] = array("audio/x-aiff");

$mime_type_match['aiff'] = array("audio/x-aiff");

$mime_type_match['au'] = array("audio/basic");

$mime_type_match['snd'] = array("audio/basic");

$mime_type_match['mid'] = array("audio/x-midi", "audio/mid", "audio/midi");

$mime_type_match['mp3'] = array("audio/mpeg", "audio/x-mpeg", "audio/mp3", "audio/mpg");

$mime_type_match['ra'] = array("audio/x-pn-realaudio");

$mime_type_match['ram'] = array("audio/x-pn-realaudio");

$mime_type_match['rm'] = array("audio/vnd.rn-realmedia", "application/vnd.rn-realmedia", "video/vnd.rn-realvideo", "application/vnd");

$mime_type_match['rpm'] = array("audio/x-pn-realaudio-plugin");

$mime_type_match['wav'] = array("audio/x-wav");

$mime_type_match['avi'] = array("video/x-msvideo", "video/avi");

$mime_type_match['mpg'] = array("video/mpeg");
$mime_type_match['mpeg'] = array("video/mpeg");
$mime_type_match['mpe'] = array("video/mpeg");

$mime_type_match['mov'] = array("video/quicktime");
$mime_type_match['qt'] = array("video/quicktime");

$mime_type_match['swf'] = array("application/x-shockwave-flash");

$mime_type_match['psd'] = array("application/octet-stream");
$mime_type_match['fla'] = array("application/octet-stream");

$mime_type_match['gz'] = array("application/gzip", "application/x-gzip-compressed");
$mime_type_match['rar'] = array("application/x-rar-compressed");
$mime_type_match['tar'] = array("application/x-tar");
$mime_type_match['gtar'] = array("application/x-gtar");
$mime_type_match['zip'] = array("application/zip", "application/x-zip-compressed");
$mime_type_match['sit'] = array("application/x-stuffit");

$mime_type_match['pdf'] = array("application/pdf", "application/x-pdf");

$mime_type_match['ai'] = array("application/postscript");
$mime_type_match['eps'] = array("application/postscript");
$mime_type_match['ps'] = array("application/postscript");

$mime_type_match['txt'] = array("text/plain", "text/richtext", "text/rtf", "text/html");
$mime_type_match['rtf'] = array("text/plain", "text/richtext", "text/rtf");
$mime_type_match['rtx'] = array("text/plain", "text/richtext", "text/rtf");

$mime_type_match['doc'] = array("application/msword");
$mime_type_match['xls'] = array("application/vnd", "application/x-msexcel");
$mime_type_match['ppt'] = array("application/vnd");

$mime_type_match['csv'] = array("text/comma-separated-values");
$mime_type_match['js'] = array("text/javascript");
$mime_type_match['css'] = array("text/css");

so what is the prob?

Offline Xyu BAM

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: How can I add more allowed file extensions?
« Reply #13 on: September 19, 2005, 03:33:36 AM »
you must add the new MIME type into the array of 'wav' extension, the same way 'jpg', 'bmp' and othere have...
please read again the tutorial, everything is explained there.
Code: [Select]
$mime_type_match['wav'] = array("audio/x-wav", "audio/wav");

Offline we_scooter

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • http://www.alqassim.org
Re: How can I add more allowed file extensions?
« Reply #14 on: September 19, 2005, 08:04:06 PM »
 :oops: ty
I tried ur wav ext addintion and it worked just fine:)

so is there a special scheme for every file format?

like jpg,gif,png,aif,au,avi,mid,mov,mp3,mpg,swf,wav,ra,rm,zip,pdf,3gp,rar,wmv,wma,amr  ?

 :oops: