Added upload file function