Skip to content

AddCustomData()

ts
// in class: Session
function AddCustomData(s: string);

This function adds a custom piece of information (in string format) to the Session's custom data storage. This is basically a list of string values that the Session object provides in order for Syncplify's scripting engine to be able to store temporary information in one event-handler that can later on be retrieved from a different script running within the context of a different event-handler.

In a nutshell it's a clever way for different scripts and event-handlers to pass data to each other down the chain.

Example

ts
{
  // Store the name of the file being uploaded for later use
  Session.AddCustomData(Session.GetRelPath());
}