main
main copied to clipboard
Paste Image from clipboard opens "Share Files"
Previously, I believe that we could copy and paste images from the clipboard directly in a chat window.
Now, it seems to treat the image as a File Transfer.
Perhaps related, but copied cells from a spreadsheet (Excel/LibreOffice Calc) also are treated as images in these respects, instead of pasting as text.
The last build (that I know of) where this worked might've been 1.4.2019.03.20.
not exactly is a file transfer but a file sharing. https://xmpp.org/extensions/xep-0385.html It will try to reuse you httpupload service provided by your xmpp server or if it's not provided your party will be able to download file via jingle.
regarding Excel/LibreOffice Calc I didn't think of such a problem. Current algo gets an image from the clipboard if it has one. If no image it tries to parse file links (as if we dragged a file to the chat window) and if nothing works it fallbacks to regular text pasting. Apparently when copy from Excel/LibreOffice it adds both an image and text to the clipboard's contents. And it's where we have a problem. There are two ways to solve it:
- If together with an image we have some text, ignore image and paste text
- allow user to select what to share
Previously we had two ways of image sharing (both via plugins): 1) httpuload 2) inline images when they are small enough. So the first way is not converted into in-core file sharing and the plugin is deprecated. The second way is still available for example via chat toolbar button.
File sharing implementation is still Work-In-Progress, so I'm happy to accept and review any feedback.
Thanks for the reply. I'll look into the HTTP Upload capabilities in Openfire and see if that works out.
Regarding jingle, it's peer-to-peer, right? Is there any other configuration necessary to make this work?
As an aside, if I drag/drop a file into the "read" portion of the window, it initiates a File Transfer. If I drag/drop a file into the "write text" portion, it initiates a File Share.
Also ensure your Openfire has socks5 bytestream proxy enabled. It will be auto-discovered and used by Psi when p2p connection is impossible. In case of sock5 connection failure usually it fallbacks to in-band transfer which is very slow.
I'll unify the drag'n'drop behavior next few days.
So far, the HTTP Upload solution seems to work with OpenFire.
I already have File Transfer Proxy configured -- which mostly works, but still nothing with Jingle connections -- not even in-band.
WRT pasting Spreadsheet data, perhaps a "Paste as text" might work? The existing "Paste as quotation" also works, though obviously quoted.
Jingle with file sharing wasn't event tested yet. I admit it may has problems. Jingle file transfer works though (via toolbar -> send file).
Jingle with file sharing seems to work. only audio messages and images are supported for now.