upload_file#

Session.upload_file(file_name, remote_file_name=None, overwrite=False)#

For internal use only: upload a file to the PIM-managed instance.

Reduces to a no-op if the System Coupling instance is not managed by PIM.

The remote file may optionally be given a different name from the local one and, if not, any directory prefix is stripped in the PIM case.

Unless overwrite is True, a FileExistsError will be raised if the remote file already exists.

Parameters:
file_namestr

local file name

remote_file_namestr, optional

remote file name - default is None

overwrite: bool, optional

whether to overwrite the remote file if it already exists - default is False

Returns:
str

The remote file name, excluding any directory prefix that might have been present in file_name.