I use a http://tutorialzine.com/2011/09/html5-file-upload-jquery-php/ for file uploading.
I wanted to check on the server side whether the uploaded file is an actual file or a directory. I tried the following without success:
This returns text/plain for folders:
This returns false for files and folders (tmp_name is something like /tmp/12Sdfds2 for folders):
What else can I try?