'Accept' attribute of input element is not working

后端 未结 3 963
长发绾君心
长发绾君心 2021-01-05 13:57

I came across a browse file dialog-control tag in html and the tag was

         


        
3条回答
  •  青春惊慌失措
    2021-01-05 14:38

    It seems like browsers have trouble following the IANA specifications found here: http://www.iana.org/assignments/media-types/media-types.xhtml

    In my case, the application/pkcs* media types don't work at all, while for some reason application/x-pkcs12 works in chrome and partially(.p12) in IE. Firefox seems completely oblivious.

    I also found this more optimistic discussion over here. File input 'accept' attribute - is it useful?

    So, the best description would be "probably unsupported for uncommon formats", and with the x-pkcs vs pkcs confusion more or less unusable in my case.

提交回复
热议问题