Skip to content

psLocalFile - cWebImage

References a file in the server's local file system

Type: Property
Access: Read/Write
Data Type: String
Parameters: None

Syntax

Property String psLocalFile
Access Type Syntax
Read Access: Get psLocalFile to StringVariable
Write Access: Set psLocalFile to StringVariable/Value

Description

You can set the psLocalFile property to reference a file in the server's local file system. So long as the web application has access rights to this file, then it can be read and sent to the image control on the client.

Object oImage is a cWebImage
    Set psLocalFile to "C:\Photos\MiamiHoliday.jpg"
    //...
End_Object

In the above example, an image file (MiamiHoliday.jpg) in a local server folder is referenced using the psLocalFile property.

For security reasons, the psLocalFile property is not synchronized to the client. psLocalFile can be set in the object declaration, but not modified once the image control is loaded to the client. Send UpdateLocalImage to change the local file image that is displayed in the image control.

Object oButton is a cWebButton
    Set psCaption to "Change Holiday"

    Procedure OnClick
        Send UpdateLocalImage of oImage to "C:\Photos\NewYorkHoliday.jpg"
    End_Procedure
End_Object

The psLocalFile and psURL properties are mutually exclusive. You should use one or the other, but not both.