SendFile

<< Click to Display Table of Contents >>

Manual > Control Reference > Route > Route Methods >

SendFile


 

Send the file to the server's public folder.

 


syntax

SendFile(

         name,

         clientFile,

         serverFile

         [, sendMode = ""]

         [, bAsync = FALSE]

         [, eventTarget]

         [, eventName]

         [, eventGroup]

         )

 


Parameters

 

name


Type:

character


The public folder name.

 

However, if the following are specified, the corresponding behavior will occur.

"[local]": Copied from clientFile to serverFile as a local file. Example: SendFile("[local]", "c:\data1\xxx.txt", "c:\data2\xxx.txt);

 

clientFile


Type:

character


The file path on the client (the PC on which the browser is running).

 

serverFile


Type:

character


File path of the server (the PC on which the server is running).

If you specify the public folder name starting with \\, such as "\\server_data_cnf1\abc1.jpg", the name argument will be ignored.

 

sendMode


Type:

character


File sending mode. If empty, always send the file to the server.

FALSEIFEXISTS: If the file exists on the server side, it will not be sent.

FALSEIFEXISTSANDSAMETIME: If the file exists on the server side and the dates of the file on the server side and the file on the client side are the same, no transmission will be performed.

FALSEIFEXISTSANDOLDTIME: If the file exists on the server side and the date of the file on the client side is older, no transmission will be performed.

 

bAsync


Type:

Boolean


TRUE - Send the file asynchronously. FALSE - Do not send the file asynchronously.

 

eventTarget


Type:

Object


Specify an object if you want to generate the common event "OnCommonEvent" after processing is completed. In the case of asynchronous (bAsync=T), you must ensure that the specified object exists until the event occurs. Please note that an application error will occur if the object no longer exists.

 

eventName


Type:

character


Specify the string to be passed as the first argument (name) of the common event.

 

The argument specifications for OnCommonEvent are as follows:

event OnCommonEvent(name, value)

name : The string specified in eventName

value: The array below.

value[0] : Method name ("SendFile")

value[1]: On success - TRUE. On failure - FALSE.

value[2]: The string specified in eventGroup.

value[3]: Public folder name (the value specified in the first argument of SendFile).

value[4]: Server file path (the value specified as the second argument of SendFile).

value[5]: Client's file path (the value specified as the third argument of SendFile).

 

eventGroup


Type:

character


Event group name. If you specify this group name in the CancelSendFile method, you can cancel an asynchronous send request.

 

Return Value



Type:

Boolean


FALSE - Failure. TRUE - Success.

 


 


Supported


×

Script Action

○

Browser script

×

Calculation Expression Syntax

 

 


reference