HTML5 does not allow directory upload.
But inevitably, some users will end up uploading a folder, because they don't know about HTML5 rules. The uploaded folder is just a small file.
How should I handle those cases?
- Should I pretend the user really wanted to upload this small (probably meaningless) file?
- Should I try to check if uploaded file is actually a folder, and warn the user if it is? (the actual data of a folder file is different on every OS, so not that easy)
- Is it the browser's fault, should Chrome prevent the user from HTML5-uploading a folder?
Note: Alfresco uses the first strategy. If you know any application that uses the second strategy I would be glad to hear about it.