added code to upload file to owncloud but it has bugs