Forum Moderators: open
< input type=file name=files accept="html" >
and hope that the file upload window that pops up will have a filter set for html files. However, my browser ignores it.
Am I missing something?
>Am I missing something?
No you are not missing anything, most modern browsers ingnore the accept= parameter. As a suggestion, you could code this function into the upload script to screen for file type, if the file is an .html file then go ahead and accept it, if it isn't an .html file then spit out a message that only .html files are accepted for upload.
I do this for a site where I want only .jpg and .gif files that are under a certain size accepted for upload and it works well.
Hope that helps.