Late update, but I fixed it!
First, you have to send the following message to the websocket: `${this.battle}|/uploadreplay`, replacing `this.battle` with the battle id.
Next, you have to look for the message that starts with `|queryresponse|savereplay` then parse the JSON, and run the following...