Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pasting an image from clipboard to a website

I need to come up with a solution for users to be able to paste an image on to a website, then upload that image on to the web server. I'm not sure what the right solution for this - I am pretty sure javascript is out of the question because I don't think it can handle binary clipboard data (or any clipboard data?)

So, I'm not sure which way to go with this. Is this something possible with a Java applet? Or maybe a Flash SWF? Any other alternatives?

like image 891
Andy Baird Avatar asked Dec 11 '08 22:12

Andy Baird


3 Answers

Or this free one (via another StackOverflow question)

like image 120
Phil Avatar answered Nov 15 '22 06:11

Phil


You can use pure JavaScript for this, assuming either Chrome or Chrome Frame. Since most other plugins or applets require a specific install action you might as well require installing Chrome Frame as that will fix quite a bit more than just pasting events.

View a live demo of a jQuery plugin that cleanly wraps the HTML Clipboard API. This demo requires the Chrome browser.

like image 38
Daniel X Moore Avatar answered Nov 15 '22 05:11

Daniel X Moore


Rad Upload (java applet). It's not free, but it is relatively cheap.

like image 37
Chris Van Opstal Avatar answered Nov 15 '22 05:11

Chris Van Opstal