|
|
|
@ -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)
|
|
|
|
|