New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot paste images from clipboard into chat #2108
Comments
this is also a feature request on the forum: |
We can either use the pure js api: https://stackoverflow.com/questions/6333814/how-does-the-paste-image-from-clipboard-functionality-work-in-gmail-and-google-c Or we use https://www.electronjs.org/docs/api/clipboard#clipboardreadimagetype with which we have the blob already in the backend. |
I'd go for the rest api because its future compatible with moving away from electron and also we don't block the ipc channel. |
But this will probably cause firewall trouble on windows. Are you sure we want to sort this out now? |
I do not use Windows Firewall or Windows Defender (my router has a good firewall). Perhaps there can be an advanced toggle in options to bypass this concern? It's be awesome to see this feature in the Desktop app!! |
This seems perfectly good to me. Would it be as simple as setting the Edit: Or perhaps it could dump the pasted image to a temporary file then pass that file path to the backend? |
I am a little bit lost. As a basic function of an IM, DC has not been able to realize it until today. |
It can't have everything right away. It's an excellent open source platform. I wouldn't call it a "basic function of IM"... technically more IMs don't do that than those that do... but it's something we've grown used to from platforms that are less safe but have practically unlimited money to throw around... Just saying, try to uplift the project and understand that there isn't time to figure everything out immediately, already there's a wonderfully innovative core platform that covers enormous ground |
So far able to access the binary data of pasted images here: master...jchook:copy_paste_images However it looks like we cannot save a temp file from the renderer, and I feel unsure about the best way to pass this over IPC. |
unfortunately dc core currently expects a file path to a file on disk. So its not possible right now. For a first prototype you could simply make a method in |
Thanks @Simon-Laux I had a bit of trouble passing binary data over IPC and properly saving it to a file so I switched to using the Electron clipboard API, and that seemed to work well. |
I tried @jchook's |
The text was updated successfully, but these errors were encountered: