There is a problem with JavaScript reading pictures from the pasteboard.

now I want to get the picture for some processing before the user pastes the picture into the text box, so I intercept the paste event

$(".w-e-text").on("paste",function(e){
    console.log(e)
});

then I copy a picture locally, but the object from the browser print shows the clipboard like this:

clipboard.png

is there a big god who can tell me how to get the pictures from the clipboard in JavaScript? now it"s a function for Chrome browsers

Apr.07,2021

var files = e.clipboardData && e.clipboardData.items;

// 
var file = files[0];

if (file && file.size > 0 && /image\/\w+/i.test(file.type)) {
   // ,  0
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5f0d4-457ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5f0d4-457ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?