I am trying to prevent zip files from being uploaded if it contains files with certain file extensions. Is there a built-in function in PHP or at least a class/library existing somewhere that can get all the file extensions inside a zip file?
Share
PHP won’t be able to read the file client side. You won’t be able to check the file extensions inside the file until after it is uploaded. Check out these links:
Check the content of file before upload