This is doable. Here's an API that could work:
1) The upload part. For example:
$ tmate-slave upload some_file
this would upload a file through a new ssh channel (why not using the scp protocol)
The file would be stored somewhere on the tmate-slave server resides.
2) the download part
$ ssh sessio...@tmate-slave.host list-files
$ ssh sessio...@tmate-slave.host cat file
$ scp sessio...@tmate-slave.host:file destination
notes:
- this means that we need a per session chroot environement, deleted when the session terminates
- ENOSPC should be handled gracefully
- eventually we'll want to pass the files to the elixir proxy, and store the files in some database (e.g. s3)
you're welcome to take a stab at it!
however, this is some quite complex piece of code to get working.
If you'd like we can pair on this so it's easier for you to get started?
Nico