nextcloud / officeonline

officeonline
49 stars 14 forks source link

Pasting image from Clipboard does not work #472

Closed andbag-sf closed 4 months ago

andbag-sf commented 1 year ago

Describe the bug when I try to paste image from clipboard into text document it fails

To Reproduce Steps to reproduce the behavior:

  1. Find image in the internet
  2. Right click it
  3. Select "Copy image"
  4. Open document
  5. Try paste it using Ctrl + V

Expected behavior Image can be pasted from clipboard

Screenshots If applicable, add screenshots to help explain your problem.

Client details:

Operating system: Debian 10

Web server: Apache

Database: Mysql

PHP version: 8.1.11

Nextcloud version: 26.0.3

Version of the officeonline app 2.0.2

Version of Office Online server

Logs #### Nextcloud log (data/nextcloud.log) ``` Insert your Nextcloud log here ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
aressler38 commented 4 months ago

I get this error.

The server encountered a unknown error while parsing the [object command.

image

This looks related: https://help.nextcloud.com/t/unable-to-insert-images-into-collabora-writer-error-while-parsing-object-command/183650

aressler38 commented 4 months ago

I have this problem when I try to paste a PNG from my clipboard. In the browser’s network tab, I can see that it makes a POST call to

/custom_apps/richdocumentscode/proxy.php?req=/cool/https://{my domain}/index.php/apps/richdocuments/wopi/files/ blah blah…

It has this request body in the POST payload is this:

B0x6a
0xd
[object Blob]

And, the response body is this:

T0x15e
0x1f
error: cmd=[object kind=unknown

I think it doesn’t know how to serialize blob objects and put them in the request body correctly. The POST payload is clearly incorrect.

juliusknorr commented 4 months ago

For officeonline copy/paste is part of the office online server implementation so nothing we can to here for the integration.

Other reporters here seem to relate to richdocuments/richdocumentscode so please head over to those repos to report this if still an issue with the latest releases.