SFTP: make it so files can be downloaded into resources or upload from resources

Fixes #428
What is the idea behind using switch(true) over if / else again?