php .zip and .rar upload mime types help needed

Discussion in 'PHP' started by the Player, Oct 12, 2009.

  1. #1
    Hello guys

    i am building a .zip and .rar file upload script in php , its working fine with IE, firefox, opera and other browsers but not for Google Chrome, is there any special mime type for Google Chrome, pls guys help me.. currently i am using the below mime types

    
    array('application/zip','application/rar','application/x-zip-compressed', 'multipart/x-zip','application/x-compressed','application/octet-stream','application/x-rar-compressed','compressed/rar'.'application/x-rar')
    Code (markup):

    or can anyone provide me good working .zip and .rar file upload script in php. thanks.
     
    the Player, Oct 12, 2009 IP
  2. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I wouldn't rely on mime-type to be honest to check if a file is the right type (ie rar file could be uploaded that is actually a jpeg using simple header injection)
     
    JAY6390, Oct 12, 2009 IP