added uploading of files in incoming, outgoing and receiving functions