Accessing local files

With the purpose of providing secure urls to files that are not located in the application's web tree, we included two methods:

VirtualUI.HTMLDoc.CreateSessionURL(URL, LocalPath)

This method allows you to create a virtual URL valid during the session's lifetime.

· The "URL" parameter is the virtual URL to access the Filename or Directory specified in LocalPath.

· "LocalPath" can be a file name or a directory. If it is a file name, the URL parameter resolves to that filename; if it is a directory, the URL parameter is a virtual path that can be used to access any file under this local directory.

URL = VirtualUI.HTMLDoc.GetSafeURL(Filename, lifetime)

This method allows you to create a unique virtual URL for a specific file, valid during the time specified in minutes in the Lifetime parameter.

· The "Filename" parameter points to the local filename we want to create an unique URL for.

· "Lifetime" is the time during which the returned URL will be valid.

Last updated