Paste the image in the input box and upload it to the server. How can this problem be achieved using PHP? (This is not the way to upload local files, but from the clipboard) paste an image in the input box and upload it to the server. How can this problem be achieved using PHP? (This is not the way to upload local files, but from the clipboard)
Reply content:
Paste the image in the input box and upload it to the server. How can this problem be achieved using PHP? (This is not the way to upload local files, but from the clipboard)
Does this require the File API function in HTML5? IE8 is not supported in most cases:
Document. onpaste = function (event) {var items = event. clipboardData. items; for (index in items) {var item = items [index]; if (item. kind = 'file') {var blob = item. getAsFile (); var reader = new FileReader (); reader. onload = function (evt) {console.log(evt.tar get. result)}; reader. readAsDataURL (blob );}}
However !!!! Do not mistakenly think that you can directly copyAn Image File
Paste the image file and press the PrntScr key or copy the image content in windows !!!