This article mainly introduces the image upload plug-in ImgUploadJS: Use HTML5 File API to implement screenshot paste and upload related information. Friends who need it can refer to the next one. Background and effects
Currently, the most uploaded files on the Internet are picture files, but the screenshot upload of traditional web pictures requires: save screenshots ->select paths ->save and then click uploads ->select paths ->uploads ->insert.
Image file upload also requires: select the path and then -> Upload -> Insert. The steps are complicated, and the Internet experience is king. If you support screenshot pasting and uploading, dragging and dropping, it will greatly improve the experience.
Currently, Zhihu and github support these two features for modern browsers. They learn to implement it when they are idle. Today, let’s talk about what functions this 1kb plug-in implements, how to use and principles.
First look at the insert effect:
Paste and upload directly after the screenshot.
Drag and drop upload http network2. Use examples
Directly call:
XML/HTML Code Copy content to clipboard