Se faccio cosi?

var folder = <%=SESSION("codice-token")%>,
var settings = {
url: "upload.php?folder=" + folder + "" ,