We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56a863e commit 056f361Copy full SHA for 056f361
janeway_ftp/sftp.py
@@ -24,6 +24,7 @@ def send_file_via_sftp(
24
file_path,
25
file_name,
26
known_hosts_file=None,
27
+ confirm_file_sent=True,
28
):
29
30
ssh = paramiko.SSHClient()
@@ -51,7 +52,7 @@ def send_file_via_sftp(
51
52
ensure_remote_directory(sftp, remote_file_path)
53
54
upload_path = f"{remote_file_path}/{file_name}"
- sftp.put(file_path, upload_path)
55
+ sftp.put(file_path, upload_path, confirm=confirm_file_sent)
56
logging.info(f"File uploaded successfully to {upload_path}")
57
except Exception as e:
58
logging.error(f"Failed to send file via SFTP: {e}")
0 commit comments