How to write api method to Read file and save it in ftp server using webapi c#
[Route("getdata")] [HttpPost] public string ReadFromAzureAS(string path) { //FTP Server URL. string ftp = "ftp://localhost:21/"; //FTP Folder name. Leave blank if you want to upload to root folder. string ftpFolder = "Uploads/"; string status = "File Transfer Failed"; FileStream stream = File.OpenRead(path); byte[] fileBytes = new byte[stream.Length]; stream.Read(fileBytes, 0, fileBytes.Length); stream.Close(); //Begins the process of writing the byte array back to a file ...