Skip to content

pbAutoStart - cWebFileUploadForm

Determines whether file upload will begin automatically after files are dropped or selected

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

Syntax

{ WebProperty=Client }
Property Boolean pbAutoStart
Access Type Syntax
Read Access: WebGet pbAutoStart to BooleanVariable
Write Access: WebSet pbAutoStart to BooleanVariable/Value

Description

When pbAutoStart set to True (the default), then the file upload will begin as soon as files are dropped onto the drop-zone or are selected from the file selection dialog.

If pbAutoStart is False, the file upload will not start immediately. It will wait until the StartUpload procedure is explicitly called. Note that the OnFileUpload event is also not triggered until StartUpload is called.

Sample

The sample code below demonstrates a cWebFileUploadForm where the upload is initiated in the OnClick event of a separate cWebButton object.

Object oWebFileUploader is a cWebFileUploadForm
    Set pbAutoStart to False

    Function OnFileUpload String sFileName Integer iBytes ;
                          String sMime Returns String
        String sPath
        Get psDataPath of (phoWorkspace(ghoApplication)) to sPath
        Move (sPath + "\Uploads\" + sFileName) to sPath
        Function_Return sPath
    End_Function
End_Object

Object oWebButton3 is a cWebButton
    Set psCaption to "Start Upload"

    Procedure OnClick
        Send StartUpload of oWebFileUploader
    End_Procedure
End_Object

About Web Properties

Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.

The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.

About Web Properties

Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.

The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.