Uploadfile

Add upload file functions.
Do you review changes please?