Results 1 to 6 of 6
  1. #1
    franzyx's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Right There.
    Posts
    607
    Reputation
    7
    Thanks
    73
    My Mood
    Fine

    php file upload type restriction

    hi guys i got this quote for php
    is supposed to allow all kind of images,text files(.txt) and zip but the zip and txt are not working
    any hint ?
    what am i doing wrong
    thank in advance for any help

    if ((($_FILES["file"]["type"] == "image/gif")
    || ($_FILES["file"]["type"] == "image/jpeg")
    || ($_FILES["file"]["type"] == "application/zip")
    || ($_FILES["file"]["type"] == "image/png")
    || ($_FILES["file"]["type"] == "image/bmp")
    || ($_FILES["file"]["type"] == "text documents/txt")
    || ($_FILES["file"]["type"] == "image/pjpeg"))
    && ($_FILES["file"]["size"] < 8388608))

  2. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Small "Bug" in Chrome (Possibly Firefox as well) - It should work in IE however. Test in IE, let us know.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  3. #3
    franzyx's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Right There.
    Posts
    607
    Reputation
    7
    Thanks
    73
    My Mood
    Fine
    Yeah @NextGen1 your right chrome maybe buggie or something btw i knew that it works on internet explorer but i still see it as not working because i use chrome as my main browser and i guess most ppl do

    edit
    Hopefully this mime works for chrome for uploading zip files

    Code:
    ($_FILES["file"]["type"] == "application/octet-stream")
    Last edited by franzyx; 04-15-2012 at 01:18 AM. Reason: additional info

  4. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Best thing to do it report it to Issue Tracking / Reports. {If it hasn't been reported yet}. There may be some work around{s}.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #5
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    This defies all logic ._. internet explorer having something that doesn't work in chrome/ff? O_O
    Ah we-a blaze the fyah, make it bun dem!

  6. #6
    franzyx's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Right There.
    Posts
    607
    Reputation
    7
    Thanks
    73
    My Mood
    Fine
    @Hell_Demon i know right
    idk somehow i always test my php script using internet explorer first and then try others browser
    maybe a bad habbit

Similar Threads

  1. Wow CooL File uploading Site.
    By tabuzo013 in forum General
    Replies: 8
    Last Post: 01-27-2011, 12:53 PM
  2. Battlefield 2 and Battlefield 2142 Multiple Arbitrary file upload
    By cruizrisner in forum Battlefield Hacks & Cheats
    Replies: 12
    Last Post: 08-22-2010, 09:00 AM
  3. Does anyone know fast file uploader I can use?
    By Ariez in forum Art & Graphic Design
    Replies: 10
    Last Post: 05-05-2009, 03:08 PM
  4. Replies: 0
    Last Post: 08-16-2008, 05:45 AM