Parameter | Description |
---|---|
sPath | The absolute path to a local folder |
Procedure RegisterDownloadFolder String sPath
Call: | Send RegisterDownloadFolder sPath |
This procedure is used to register a local file path as an accessible download folder. Subfolders of this folder inherit these permissions, so you don't need to register every subfolder.
This means that download URLs can be generated to files inside this folder using the DownloadUrl and CustomDownloadUrl functions. It is also required for UpdateLocalImage.
Note: The download folder needs to be registered on every process, so usually this would be done when starting a process. For example, inside the End_Construct_Object or directly inside an object.
Download URLs pointing to files that are not inside a registered folder will result in an error. This is an extra layer of security, sandboxing the download URLs.
Sample
// create a cWebResourceManager subclass: Use cWebResourceManager.pkg Class cMyClassNameWebResourceManager is a cWebResourceManager Procedure End_Construct_Object Forward Send End_Construct_Object Send RegisterDownloadFolder of ghoWebResourceManager "C:\MyDownloadFolder" End_Procedure End_Class // then use the subclass: Use cMyClassNameWebResourceManager.pkg Object oWebResourceManager is a cMyClassNameWebResourceManager End_ObjectSee Also