added support for uploading files to a server (untested)