def METHOD_NAME(file_field, file_name):
    # generate a temp file
    tmpfd, tmpname = tempfile.mkstemp()
    os.close(tmpfd)
    # create a temp copy of the archive without filename
    with zipfile.ZipFile(file_field.open(), "r") as zin:
        with zipfile.ZipFile(tmpname, "w") as zout:
            zout.comment = zin.comment  # preserve the comment
            for item in zin.infolist():
                if item.filename == "document.json":
                    doc_string = zin.read(item.filename)
                    doc = json.loads(doc_string)
                    if "contents" in doc:
                        doc["content"] = doc["contents"]
                        del doc["contents"]
                    update_node(doc["content"])
                    zout.writestr(item, json.dumps(doc))
                else:
                    zout.writestr(item, zin.read(item.filename))
    # replace with the temp archive
    with open(tmpname, "rb") as tmp_file:
        file_field.save(file_name, File(tmp_file))
    os.remove(tmpname)