Added sending files to server functionality.