The problem

Some browsers, such as ChromeInput [type=file], are slow to open

Have you ever come across this problem? No request is required, sometimes it takes ten seconds to open a local file, crash!

The solution

Accept =”image/ PNG,image/jpeg..”

why

  • Chrome’s SafeBrowsing feature checks files when they are uploaded or saved
  • Network speed will affect
  • When the network is slow, SafeBrowsing allows Chrome to hang for a period of time until a file check is complete or a time out
  • The MIME types png&jpeg are within the SafeBrowsing whitelist and do not need to be checked

Then you realize that if I want to upload zip/rar files, specifying it doesn’t help. So this is why..

Actually, the bottom line is that you’re in China and you’re being walled in…

Another way to do this is to open your Chrome Settings, go to the following, and turn it off…

Oh, you’ll see! Accept =image/* Open the file selection box Open zip file is not stuck ~!

In fact, if you carefully analyze its request, it will start a request for SafeBrowsing when it is opened in the picture above. And then you get stuck…

When you close, there is no request, and there is no timeout…

Yeah, great.