Sends the data of a file in binary mode to the remote host. Before WebTcpipSendFile can be used, a valid connection has to be established with WebTcpipConnect.
WebAPI.bdh
WebTcpipSendFile( in hWeb : number, in sFileName : string ): boolean;
true if the file was sent successfully
false otherwise
Parameter | Description |
---|---|
hWeb | Valid handle to a Web connection that was created by WebTcpipConnect |
sFileName | File to send to the server. The file is opened in binary mode and sent until end of file. |
dcltrans transaction TWebApplevel var hWeb: number; begin WebTcpipConnect(hWeb, "standardhost", WEB_PORT_HTTP); WebTcpipSendFile(hWeb, "c:\\temp\\archive.zip"); WebTcpipShutdown(hWeb); end TWebApplevel;
WebFileUpload01.bdf