Skip to content

Draft: Ability to send files / images on clipboard between Android and Linux clients (Linux Version)

Pavel Potemkin requested to merge tsogp/kdeconnect-kde:clipboard-file into master

Summary

Reusing the code from composite upload and receive jobs, I implemented a feature to sync clipboard files between connected devices. It works on both Android and Linux, meaning that the file/image on Linux clipboard can be sent and set on Android clipboard and vice versa.

The solution is mostly ready, currently it lacks some notification, error and config handling because it seemed like those are subjects of discussion with project maintainers.

The things that should be discussed are:

  • Should there be only limited accepted file extensions available to be synced? (currently there are none)
  • Should there be notifications showing that files are being sent like in the SharePlugin? (currently there are none)
  • Should there be a max size limit for a file to be sent? Should it be a configurable option? How should it be synced between two devices and should it be synced? (currently no)
  • Should the destination folder for clipboard files be a configurable option? (currently a temp folder is created)
  • Should folders be synced? If so, how should they be serialized (e.g. archived)? (currently app silently fails to open a folder and doesn't send it)

I am happy to modify any code based on comment / criticism and provide any additional info to the pull request.

Link to the Android part of this feature.

Test Plan

Apart from the issued that should be discussed that I listed above, testing on two Linux machines worked with both files (file:// type URI) and pictures (identified my QMimeData::hasImage()).

Edited by Pavel Potemkin

Merge request reports

Loading