Reputation: 414
I am trying to send some files to a remote FTP server, and I need to make sure the files actually make it there before I continue my code.
Is there a way to check if the file transferred successfully using the Session.PutFile
method? It doesn't have the TransferOperationResult
return type that Session.PutFiles
does, and in fact returns void
.
If at all possible, I would like to handle the files as Stream
objects in memory, rather than saving them locally.
Upvotes: 1
Views: 1213
Reputation: 202642
The Session.PutFile
raises an exception, if any error occurs.
If it does not raise any exception, the upload was successful.
Upvotes: 1