I'm trying to handle copy & paste for images similar to drag & drop in PrimeFaces
I'm handling paste and then pass the files to remote command, but I'm receiving only strings
window.onload = function() {
console.log("paste!!");
const upldFile = document.getElementById('upld');
upldFile.onpaste = function(e) {
console.log("paste");
var items = e.clipboardData.items;
console.log(items);
if(items != undefined){
handlePaste([{name: 'data', value: JSON.stringify(items) }]);// a call to remote commend
}
}
}
JSF 2.2
Primefaces 7