Skip to content
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

Feature Request: support file clipboard #1

Open
warpdesign opened this issue Aug 29, 2024 · 1 comment
Open

Feature Request: support file clipboard #1

warpdesign opened this issue Aug 29, 2024 · 1 comment

Comments

@warpdesign
Copy link

It would be great if p2p-clipboard wasn't limited to pure text content and would allow sharing files through the clipboard.

Right now, copying a file from the Finder will only copy the filename.

@gnattu
Copy link
Owner

gnattu commented Aug 31, 2024

I thought about this during the initial implementation, but allowing the same kind of flexibility as current isn't trivial. Broadcasting arbitrary files over the network can lead to serious performance issues when the number of peers is large or the network bandwidth is too limited for the file size.

File delivery would require a new mechanism that implements proper pathfinding with path cost calculation. However, this is beyond the scope of my initial intention, which was simply to create an easy way to sync my clipboard across different OSes, as I wasn't satisfied with other implementations especially a lot of them require a central server.

For a trivial implementation, we could use the current network as is with a file size limit so that it does not overload the network interface, but even that would require handling platform-specific quirks related to pasteboard file management. The pasteboard library I'm using doesn't provide a unified API for file handling, which means I'd have to implement those platform specific functions myself and wrap them into a Rust API which is also not that strait forward.

I'm going to leave this open for now. Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants