diff --git a/js/pictshare.js b/js/pictshare.js index 73064a7..5564492 100644 --- a/js/pictshare.js +++ b/js/pictshare.js @@ -16,4 +16,15 @@ $(function() { console.log(o) } }); + + document.onpaste = function(event){ + var items = (event.clipboardData || event.originalEvent.clipboardData).items; + for (index in items) { + var item = items[index]; + if (item.kind === 'file') { + // adds the file to your dropzone instance + myDropzone.addFile(item.getAsFile()) + } + } + } }) \ No newline at end of file