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

Changes for merge documents before OAuth changes.

parent d4e10d34
......@@ -3048,37 +3048,6 @@ namespace FTP_Services.Services.Controllers
}
}
// private async Task<string> MoveFileToFtpAsync(string sourceFilePath, string destinationFilePath)
// {
// try
// {
// // FTP file move logic will go here
// // Example: Upload the file to FTP and delete the source file after upload
// var ftpClient = new FtpClient( _appSettings.FTPConfiguration.FtpURL,_appSettings.FTPConfiguration.Username, _appSettings.FTPConfiguration.Password); //_appSettings.FTPConfiguration.ServerUrl,
// // Upload the file to FTP (assuming you have an FTP client setup)
// bool uploadResult = await ftpClient.UploadFileAsync(sourceFilePath, destinationFilePath);
// if (!uploadResult)
// {
// return "Error uploading file to FTP.";
// }
// // Once uploaded, delete the source file locally if the upload is successful
// if (System.IO.File.Exists(sourceFilePath))
// {
// System.IO.File.Delete(sourceFilePath);
// }
// return string.Empty; // Return empty string if move was successful
// }
// catch (Exception ex)
// {
// return "Error moving file to FTP: " + ex.Message;
// }
// }
private byte[] DecryptFile(byte[] encryptedData, string encryptionKey)
{
byte[] keyBytes = Encoding.UTF8.GetBytes(encryptionKey);
......@@ -3109,6 +3078,7 @@ namespace FTP_Services.Services.Controllers
return decryptedBytes;
}
/* Mapped Drive folder Model,it is not working for linux */
[HttpPost("GetMRDCompressedIcons")]
public async Task<IActionResult> GetMRDCompressedIcons(
[FromBody] DocumentResponseModel model
......@@ -3194,40 +3164,7 @@ namespace FTP_Services.Services.Controllers
return bmp;
}
// [HttpPost("GetMRDFTPCompressedFolderIcons")]
// public async Task<IActionResult> GetMRDFTPCompressedFolderIcons(
// [FromBody] FTPDocumentResponseModel model
// )
// {
// if (model == null || string.IsNullOrWhiteSpace(model.FolderPath))
// return BadRequest("FolderPath is required.");
// if (model.FilePaths == null || !model.FilePaths.Any())
// return BadRequest("FilePaths list is empty.");
// // Resolve IWebHostEnvironment inside the method
// var env = HttpContext.RequestServices.GetRequiredService<IWebHostEnvironment>();
// string localTempDir = Path.Combine(env.ContentRootPath, "TempFTPDownloads");
// var ftpService = new FluentFtpService(); // or resolve via DI too
// var results = await ftpService.DownloadAndGetBase64FilesAsync(
// model,
// localTempDir,
// int.Parse(_appSettings.ResolutionSettings.Height),
// int.Parse(_appSettings.ResolutionSettings.Width)
// );
// return Ok(
// results.Select(r => new
// {
// FileName = r.FileName,
// Base64 = r.Base64,
// Error = r.Error
// })
// );
// }
/*Currently NOT Using this api as because it will take much time to process entire folder files*/
[HttpPost("GetMRDFTPCompressedFolderIcons")]
public async Task<IActionResult> GetMRDFTPCompressedFolderIcons(
[FromBody] FTPDocumentResponseModel model
......@@ -3273,6 +3210,9 @@ namespace FTP_Services.Services.Controllers
);
}
/*Currently Using this api to fetch comprassed icons*/
[HttpPost("GetMRDFTPSelectedFilesAsIcons")]
public async Task<IActionResult> GetMRDFTPSelectedFilesAsIcons(
[FromBody] FTPDocumentResponseModel model
......
......@@ -326,7 +326,8 @@ public class FluentFtpService
string extension = Path.GetExtension(localFilePath).ToLowerInvariant();
if (extension == ".jpg" ||
if (extension == ".enc" ||
extension == ".jpg" ||
extension == ".jpeg" ||
extension == ".png" ||
extension == ".gif"||
......
{
"AppSettings": {
"Secret": "A78E-F7FA-B0FD-DAA45BB866CD-AA73D560-DACC-978C-4A9B-9924-5DE7E33F0040-GCD00",
"ConnectionString": "Server=10.11.12.107;User id=curidbuser;password=curidbuser@0987!;Database=CURI_LIVE;Port=5432;MaxPoolSize=1000;Pooling=true;",
"ConnectionString": "Server=10.11.12.158;User id=himsdbuser;password=dbuser@hims123!;Database=CURI_UAT_16062026;Port=5432;MaxPoolSize=1000;Pooling=true;",
"AdminConnectionString": "SERVER=10.11.12.106;PORT=5432;UID=himsdbuser;PWD=dbuser@hims123!;database=CareaxesAdmin;Timeout=1000",
"ConnectionString_MRD": "SERVER=10.11.12.158;PORT=5432;UID=himsdbuser;PWD=dbuser@hims123!;Database=FF_Backup_MRD;Timeout=1000",
"listeningPort": "http://0.0.0.0:4710",
......
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