Commit e8b037e4 authored by Krishna Reddy Tamatam's avatar Krishna Reddy Tamatam

Corrected destination file path for upload functions.

parent 181ad9d1
...@@ -337,7 +337,7 @@ namespace FTP_Services.Services.Controllers ...@@ -337,7 +337,7 @@ namespace FTP_Services.Services.Controllers
[HttpPost("DownloadBase64DataAsync_New")] [HttpPost("DownloadBase64DataAsync_New")]
public IActionResult DownloadBase64DataAsync_New(string fileNameWithPath) public IActionResult DownloadBase64DataAsync_New(string fileNameWithPath)
{ {
string strDestinationPath = _appSettings.FTPConfiguration.DestinationPath.ToString().Trim(); string strDestinationPath = _appSettings.FTPConfiguration.DestinationPathFile.ToString().Trim();
string strMfN = fileNameWithPath.Replace("/", "\\").TrimStart('\\'); string strMfN = fileNameWithPath.Replace("/", "\\").TrimStart('\\');
string strFullPath = Path.Combine(strDestinationPath, strMfN); string strFullPath = Path.Combine(strDestinationPath, strMfN);
...@@ -446,6 +446,9 @@ namespace FTP_Services.Services.Controllers ...@@ -446,6 +446,9 @@ namespace FTP_Services.Services.Controllers
|| response.StatusCode == FtpStatusCode.FileActionOK; || response.StatusCode == FtpStatusCode.FileActionOK;
return success; return success;
} }
//Using for Scan upload
[HttpPost("UploadProfileImageAsync")] [HttpPost("UploadProfileImageAsync")]
public async Task<string> UploadProfileImageAsync( public async Task<string> UploadProfileImageAsync(
...@@ -501,7 +504,7 @@ namespace FTP_Services.Services.Controllers ...@@ -501,7 +504,7 @@ namespace FTP_Services.Services.Controllers
} }
string strDestinationPath = _appSettings string strDestinationPath = _appSettings
.FTPConfiguration.DestinationPath.ToString() .FTPConfiguration.DestinationPathFile.ToString()
.Trim(); .Trim();
string strMfN = fileName.Replace("/", "\\").TrimStart('\\'); string strMfN = fileName.Replace("/", "\\").TrimStart('\\');
...@@ -568,7 +571,7 @@ namespace FTP_Services.Services.Controllers ...@@ -568,7 +571,7 @@ namespace FTP_Services.Services.Controllers
} }
string strDestinationPath = _appSettings string strDestinationPath = _appSettings
.FTPConfiguration.DestinationPath.ToString() .FTPConfiguration.DestinationPathFile.ToString()
.Trim(); .Trim();
string strMfN = Path.GetFileName(filePath); string strMfN = Path.GetFileName(filePath);
string strFullPath = Path.Combine(strDestinationPath, strMfN); string strFullPath = Path.Combine(strDestinationPath, strMfN);
...@@ -635,7 +638,7 @@ namespace FTP_Services.Services.Controllers ...@@ -635,7 +638,7 @@ namespace FTP_Services.Services.Controllers
} }
string strDestinationPath = _appSettings string strDestinationPath = _appSettings
.FTPConfiguration.DestinationPath.ToString() .FTPConfiguration.DestinationPathFile.ToString()
.Trim(); .Trim();
string strMfN = fileName.Replace("/", "\\").TrimStart('\\'); string strMfN = fileName.Replace("/", "\\").TrimStart('\\');
...@@ -697,7 +700,7 @@ namespace FTP_Services.Services.Controllers ...@@ -697,7 +700,7 @@ namespace FTP_Services.Services.Controllers
} }
string strDestinationPath = _appSettings string strDestinationPath = _appSettings
.FTPConfiguration.DestinationPath.ToString() .FTPConfiguration.DestinationPathFile.ToString()
.Trim(); .Trim();
string strMfN = fileName.Replace("/", "\\").TrimStart('\\'); string strMfN = fileName.Replace("/", "\\").TrimStart('\\');
...@@ -769,7 +772,7 @@ namespace FTP_Services.Services.Controllers ...@@ -769,7 +772,7 @@ namespace FTP_Services.Services.Controllers
// Network share path // Network share path
string strDestinationPath = _appSettings string strDestinationPath = _appSettings
.FTPConfiguration.DestinationPath.ToString() .FTPConfiguration.DestinationPathFile.ToString()
.Trim(); .Trim();
// Replace forward slashes with backslashes for network path // Replace forward slashes with backslashes for network path
...@@ -1406,7 +1409,7 @@ namespace FTP_Services.Services.Controllers ...@@ -1406,7 +1409,7 @@ namespace FTP_Services.Services.Controllers
try try
{ {
string strBasePath = _appSettings string strBasePath = _appSettings
.FTPConfiguration.DestinationPath.ToString() .FTPConfiguration.DestinationPathFile.ToString()
.Trim(); .Trim();
sourceFilePath = sourceFilePath.Replace("/", "\\").TrimStart('\\'); sourceFilePath = sourceFilePath.Replace("/", "\\").TrimStart('\\');
......
...@@ -22,7 +22,6 @@ namespace FTP_Services.Core.Models ...@@ -22,7 +22,6 @@ namespace FTP_Services.Core.Models
public string Password { get; set; } public string Password { get; set; }
public string FtpURL { get; set; } public string FtpURL { get; set; }
public bool FTPMODE { get; set; } public bool FTPMODE { get; set; }
public string DestinationPath { get; set; }
public string DestinationPathFtp { get; set; } public string DestinationPathFtp { get; set; }
public string DestinationPathFile { get; set; } public string DestinationPathFile { get; set; }
...@@ -32,7 +31,9 @@ namespace FTP_Services.Core.Models ...@@ -32,7 +31,9 @@ namespace FTP_Services.Core.Models
Password = ""; Password = "";
FtpURL = ""; FtpURL = "";
FTPMODE = false; FTPMODE = false;
DestinationPath = ""; DestinationPathFtp ="";
DestinationPathFile="";
} }
} }
} }
...@@ -139,8 +139,8 @@ if (app.Environment.IsDevelopment()) ...@@ -139,8 +139,8 @@ if (app.Environment.IsDevelopment())
else else
{ {
//app.Run(); //For Test Site //app.Run(); //For Test Site
//app.Run("http://*:4708"); // For Production app.Run("http://*:4708"); // For Production
app.Run("http://*:4709"); // For Admin //app.Run("http://*:4709"); // For Admin
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment