27 namespace Ntp.Analyzer.Export
37 private readonly
string file;
38 private readonly
string path;
40 public override string Link =>
string.Empty;
42 public override string Value => file;
44 public override string Location => file;
46 public override string AbsoluteLocation => path + file;
48 public override void Test()
67 string absFile = AbsoluteLocation;
69 if (
File.Exists(absFile))
76 var request = (FtpWebRequest) WebRequest.Create(
"ftp://172.20.83.1/test.png");
77 request.Method = WebRequestMethods.Ftp.UploadFile;
78 request.Credentials =
new NetworkCredential(
"ntapf",
"ntpafps");
79 request.UsePassive =
false;
81 request.ContentLength = stream.Length;
82 Stream requestStream = request.GetRequestStream();
83 stream.CopyTo(requestStream);
84 requestStream.Close();
86 var response = (FtpWebResponse) request.GetResponse();
88 Console.WriteLine($
"Upload File Complete, status {response.StatusDescription}");
abstract void WriteLine(string text, Severity severity)
FtpStreamDestination(string path, string file)
override void Write(Stream stream, LogBase log)