File input 'accept' attribute - is it useful?

前端 未结 8 1616
独厮守ぢ
独厮守ぢ 2020-11-22 02:30

Implementing a file upload under html is fairly simple, but I just noticed that there is an \'accept\' attribute that can be added to the

8条回答
  •  你的背包
    2020-11-22 02:57

    Back in 2008 this wasn't important because of the lack of mobile OS'es but now quite important thing.

    When you set accepted mime types, then in for example Android user is given system dialog with apps which can provide him the content of mime which file input accepts, what is great because navigating through files in file explorer on mobile devices is slow and often stressful.

    One important thing is that some mobile browsers (based on Android version of Chrome 36 and Chrome Beta 37) does not support app filtering over extension(s) and multiple mime types.

提交回复
热议问题