add uploadFile function