                        notyf.error(res.msg);
                    }
                },
                error: function (res) {
                    loading.destroy();
                    notyf.error("{{ "NETWORK_ERROR" | gettext }}");
                }
            })
        }

        function rename_file() {
            let loading = new KZ_Loading();
            let new_name = $("#edit-name").val();
            loading.show();
            $.ajax({
                url: '/api/rename/',
                metho