Using Javascript, is it possible to upload images along with text pasted from other web pages/clipboard? -


in question paste image web page, have found reference in answer works when copy images.

is possible upload images mixed content text , image? use case is, user copy rich content web page , paste rich editor. , images embedded in content uploaded server.

i can obtain image objects, contain remote url, need image content user's browser/cache. can retrieve image remotely server-side scripts, website has anti-leach technique can't bypass. user download picture , uploaded server manually, want my site more user friendly.

to answer question, yes, possible upload images , text, may need parse images' urls etc.

as implied question, "can images , text pasted clipboard:" in ie. js doesn't allow access clipboard data security reasons (except in ie). can't data in element.onpaste event either; according mdn (https://developer.mozilla.org/en-us/docs/web/api/element.onpaste):

"there no dom-only way obtain text being pasted; you'll have use nsiclipboard information."


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -