Make upload file a utility method.