Pasting an image from clipboard to a website

て烟熏妆下的殇ゞ 提交于 2019-12-30 01:16:28

问题


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?


回答1:


Or this free one (via another StackOverflow question)




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/361324/pasting-an-image-from-clipboard-to-a-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!