Paste an image into a web page

Alexey Reznikov picture Alexey Reznikov · Dec 16, 2010 · Viewed 9.7k times · Source

Is it in any way possible, using javascript (jquery), html (5) to get a pasted image.

e.a a user click the printscreen button, opens a web page, clicks CTRL+V and the image is uploaded to the server (without the need to save to a local pc)

is it achievable through flash, java, any other technology?

ty

Answer

Daniel X Moore picture Daniel X Moore · Sep 21, 2011

Yes, this is possible in pure JavaScript, assuming either Google Chrome or Chrome Frame.

View a live demo of a jQuery plugin that cleanly wraps the HTML Clipboard API. This works by getting binary image data from the Ctrl+V paste event into JavaScript.