static S uploadFileToDiagramServer(byte[] data, S name) { print("Uploading " + l(data) + " bytes (" + quote(name) + ") to diagrams server."); S page = postPage("http://ai1.lol/1010474/raw/upload", "data", bytesToHex(data), "name", name, '_pass, muricaPassword()); print(page); Matcher m = Pattern.compile("/raw/([0-9]+)").matcher(page); if (!m.find()) fail("Diagram server said: " + page); ret "http://ai1.lol/1010474/raw/" + m.group(1); }