FTPDownloadDirectly()

Description

Downloads an file from the FTP server directly without opening it in Dynamic Web TWAIN.

Syntax

.FTPDownloadDirectly(fTPServer, fTPRemoteFile, localFile, [optionalAsyncSuccessFunc, optionalAsyncFailureFunc]);

Parameters

<string> fTPServer: specifies the FTP server.
<string> fTPRemoteFile: specifies the path of the file on the FTP server.
<string> localFile: specifies the local path for the downloaded file.

The following two parameters are optional. If either one exists or both exist, the method is asynchronous, otherwise it's synchronous.

<OnSuccess function> optional optionalAsyncSuccessFunc: callback function triggered when the file is downloaded successfully.
<OnFailure function> optional optionalAsyncFailureFunc: callback function triggered when the file failed to be downloaded.

Please refer to the function prototype OnSuccess or OnFailure.

Return value

Only valid when used synchronously.

bool

true indicates success. false indicates failure.

When false is returned, check ErrorCode or ErrorString for error information.

Remarks

Currently this method is only valid in Windows & Mac.

Technically this method can download any file from the FTP server.

Is this page helpful?

Leave a Reply

Your email address will not be published.