I'm trying to prevent uploading directly executable file types. Is there a reliable way to check if a file is an executable program or just a passive data file?
For example:
example.exe // Directly runable, consider dangerous
example.txt // Not Directly runable, consider "safe"
example.bat // Directly runable?, consider dangerous
example.doc // Not Directly runable, consider "safe"