Fix using key variable in File.upload()