fix for upload_file() not authenticating via the passed api key