In Trello, they use an event handler registered on the paste event and basically accessing event.clipboardData.items
.
The javascript code (here) is minified, hence not particularly easy to read, but it basically boils down to applying the trick found in that other question
Extract of the paste handler:
c.prototype.paste = function (b) {
var c, f, e, g, h, k, m, l;
e = null;
h = this.handlers;
for (g in h)
if (c = h[g], null != c.paste) {
e = c.paste;
break
}
if (null != e && (f = null != (k = null != (m = b.originalEvent) ? null != (l = m.clipboardData) ? l.items : void 0 : void 0) ? k : [], b = function (b) {
return _.detect(f, function (c) {
return c.type === b
})
}, !b("text/plain") && (b = b("image/png"), null != b && (b = b.getAsFile(), null != b)))) return j.validFileSize(b) ? (n("Keyboard Shortcuts", "Paste - Upload Image From Clipboard"), e(b)) : P.show("File size exceeds 10mb limit",
"error", "upload", 5E3)
};