Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

On Documentum Eroom App, IE is capable of automatically uploading image from clipboard pasting whereas Firefox can't.

So I wonder if html5 supports that kind of behavior (not just drag and drop of image/file from explorer).

Update: granting access is not enough it's also about being able to handle BINARY data not just TEXT does current firefox can handle binary I can't see it maybe it's not explicit ?

It's not about just drag and drop which is widely already implemented on many sites. It's about BINARY FORMAT CLIPBOARD MANIPULATION to save the image from the clipboard to the server without any need to save file and then drag and drop. The process to save the file somewhere is extremely daunting for user so direct uploading from clipboard is really a must time saver.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
354 views
Welcome To Ask or Share your Answers For Others

1 Answer

Yes, HTML5 has this capability and it is becoming widely implemented. You can handle events from Ctrl+V and get binary image data and do whatever you want with it.

Currently Google Chrome 13.0.782.220 works great. I have a jQuery plugin with a full demo illustrating the feature (be sure to use Google Chrome, I can't guarantee it other browsers)

http://strd6.com/2011/09/html5-javascript-pasting-image-data-in-chrome/

As robertc mentions the Clipboard API spec is becoming standardized, so it should lead to adoption across browser soon enough.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...