hanxuntao 7 months ago
parent 2cdde4e94c
commit 77e3c33390

@ -1263,11 +1263,21 @@ namespace DSWeb.Areas.Dispatch.Controllers
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.PreserveTimestamp = true;
TransferOperationResult transferResult;
transferResult = session.PutFiles(filename, SftpPath+ name, false, transferOptions);
transferResult = session.PutFiles(filename, SftpPath + name, false, transferOptions);
transferResult.Check();
foreach (TransferEventArgs transfer in transferResult.Transfers)
if (transferResult.IsSuccess)
{
foreach (TransferEventArgs transfer in transferResult.Transfers)
{
}
}
else {
result.Success = false;
result.Message = "传输过程出现错误";
}
if (session != null)

Loading…
Cancel
Save