I have a slightly strange problem here. (Either that, or I'll just miss something stupid.)
I have a form for uploading files, and I want it to accept only certain types of files, including MS Word documents. I added the MIME types .doc and .docx ( application/mswordand application/vnd.openxmlformats-officedocument.wordprocessingml.documentrespectively) to the accept attribute of the file input field, but when I click "select file", the .doc and .docx files still remain gray as they are not allowed to upload.
So what am I missing? Any help or pointers would be greatly appreciated!
(And yes, I know that form validation is not a good way to filter downloaded files. I have PHP that is more convenient for the user, so they do not go and the forbidden file does not load.)
source
share