can images be copied from services like google document? #1633

Closed
sudarsangp opened this Issue Aug 2, 2016 · 4 comments

Projects

None yet

3 participants

@sudarsangp

When i copy text from wikipedia article (which includes images and html text) the clipboard contains the image data (basically the url of the image).
image

When the same procedure is followed from google document, the following error happens.
image

image

The above error is happening only if the copied text from google document contains images.

It would be great if anyone could suggest how to solve this issue.

@codespaced
codespaced commented Nov 4, 2016 edited

I've run into this issue. Is it possible to pull the url from one of the clipboard items to upload it?

Thanks!

Copying an image from google docs puts two items in the clipboard. One is "HTML Format" and contains something like this:

Version:0.9
StartHTML:0000000105
EndHTML:0000000817
StartFragment:0000000141
EndFragment:0000000781
<html>
<body>
<!--StartFragment--><meta charset="utf-8"><b style="font-weight:normal;" id="docs-internal-guid-88ac49e7-2f98-3fb5-81a9-f77e8cd6499f"><span style="font-size:24px;font-family:'Titillium Web';color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"><img src="https://lh3.googleusercontent.com/tqhdPBnMoNEEBWhE2mRu3K04dSYfVU0qj-Je-BwX9tPvkWfDt9Ix7bkHcuTcBHf6H-5CTKnbpI7fvqM50vK_GhauypyX7f24omUEd3PKLFl_WlO8s0hs6FRvJFfIUJajxyvUuR4N" width="147" height="148" style="border: none; transform: rotate(0.00rad); -webkit-transform: rotate(0.00rad);"/></span></b><!--EndFragment-->
</body>
</html>

The other is "Chromium Web Custom MIME Data Format" that defines itself as application/x-vnd.google-docs-document-slice-clip+wrapped and contains an image_urls field:

application/x-vnd.google-docs-image-clip+wrapped{
"dih":2216750244,"data":"{
\"image_urls\":{
\"1-PTXdWaUAhGqydXKjL0Blvj1icJhrRbot85TzT8\":\"https://lh3.googleusercontent.com/tqhdPBnMoNEEBWhE2mRu3K04dSYfVU0qj-Je-BwX9tPvkWfDt9Ix7bkHcuTcBHf6H-5CTKnbpI7fvqM50vK_GhauypyX7f24omUEd3PKLFl_WlO8s0hs6FRvJFfIUJajxyvUuR4N\"},\"placeholder_ids\":{
},\"cosmo_ids\":{
\"1-PTXdWaUAhGqydXKjL0Blvj1icJhrRbot85TzT8\":1}}","edi":""}
@codespaced

Added pull request #1768

@danialfarid
Owner

Fixed at 12.2.13

@danialfarid
Owner

@codespaced thanks for the investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment