sS uploadToFileServerWithFixedID(File f, S name, S snippetID) { ret uploadToFileServerWithFixedID(loadBinaryFile(f), name, snippetID); } sS uploadToFileServerWithFixedID(byte[] data, S name, S snippetID) { print("Uploading " + l(data) + " bytes (" + quote(name) + ") to file server with id " + fsI(snippetID)); S page = postPage("http://butter.botcompany.de:8080/files/upload", "data", bytesToHex(data), "name", name, "id", psI(snippetID), '_pass, muricaPassword()); print(page); Matcher m = Pattern.compile("/raw/([0-9]+)").matcher(page); if (!m.find()) fail("File server said: " + page); S url = "http://butter.botcompany.de:8080/files/" + m.group(1); infoBox("Uploaded: " + url); ret url; }