Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

  • I know you can select the "allowable extensions", but is there a way to just list the file types you "don't" want to allow?
    I only want to restrict it from uploading php and javascript files. with the "allowable extensions" I would have to think of every possible file type on earth and list them all. is there a way to just "restrict" what I want to disallow? please help.
  • AFAIK, there's no way to blacklist files. You can use the checkScript and onCheck settings to check the file type server side before starting the upload.

    Cheers,

    Eze.
  • Just add a ! in the if statement and you'll get the opposite. For ex:

    // Validate the file type
    $fileTypes = array('exe'); // File extensions NOT to allow
    $fileParts = pathinfo($_FILES['Filedata']['name']);

    if (!in_array($fileParts['extension'], $fileTypes)) {...}