Property

Method

Event

 

 

OnFtpUploadCompleted

Invoked to indicate that the file upload is completed and shows the result.

Syntax

    void OnFtpUploadCompleted(
    long succeeded,
    BSTR fileName
    VARIANT* files
    );

Parameters

succeeded

[out] Whether the file upload is successful or not.

0

Abortive File Upload

1

Successful File Upload

fileName

[out] Filename of the files uploaded. This value is identical to docName of FtpUpload.

files

[out] Returns names of the files uploaded in the FTP server after transferring the HTML and attached files. The filenames of HTML files are shown at the top of the files.

Sample Codes

VBScript

Function FtpUpload_OnClick
dim files()
dim object
set object = Document.editForm
object.wec.FtpFileScope = 0
object.wec.FtpFileFilter = 0
object.wec.FtpPassiveMode = 1
object.wec.FtpPort = 21
object.wec.FtpUserName = "admin"
object.wec.FtpPassword = "adminxxx"
object.wec.FtpUpload "www.myhome.co.kr", "/public_html", "index.htm"
End Function
Sub wec_OnFtpUploadCompleted(success, filename, files)
dim result, I
result = success & " " & fileName & " " & _
UBound(files) & " " & LBound(files)
for i = LBound(files) to UBound(files)
result = result & " " & files(i)
next
MsgBox result
End Sub

See Also

FtpFileFilter, FtpFileScope, FtpPassiveMode, FtpPassword, FtpPort, FtpUpload, FtpUserName