IPWorks EDI 2020 Python Edition

Questions / Feedback?

send_file Method

Sends a file to the specified client.

Syntax

def send_file(connection_id: int, client_sfid_code: str, file_name: str, virtual_file_name: str) -> None: ...

Remarks

This method sends a file to the client specified by the ConnectionId parameter.

After the on_ready_to_send event fires or when the oftp_connection_ready_to_send property is true, this method can be used to send a file to the connected client specified by the ConnectionId parameter.

The ClientSFIDCode corresponds to the destination.

FileName must be the full path to the file which will be sent.

VirtualFileName may be specified to indicate the name of the file that the client will see when receiving the file.

If connections_upload_stream is set, pass empty string as the value for the FileName parameter.

When this method is called, the class will fire the on_start_transfer, on_transfer, and on_end_transfer events that can be monitored to check the status of the send. The on_send_file method will not return until either the transfer is complete or an error was encountered.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 Python Edition - Version 20.0 [Build 8203]