using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CPRNIMS.Infrastructure.Constant { public class FileExtension { public const int Pdf = 1; public const int Jpeg = 2; public const int Png = 3; public const int Csv = 4; public const int Xlsx = 5; public const int Docx = 6; public const int Pptx = 7; public const int AI = 6; public const int Psd = 7; } public class FileExtensionPath { public const string Pdf = "Content/Documents/pdf"; public const string Csv = "Content/Documents/csv"; public const string Xlsx = "Content/Documents/xlsx"; public const string Docx = "Content/Documents/docx"; public const string Pptx = "Content/Documents/pptx"; public const string Png = "Content/Images/UserProfile/png"; public const string Jpg = "Content/Images/UserProfile/jpg"; public const string AI = "Content/Images/UserProfile/ai"; public const string Psd = "Content/Images/UserProfile/psd"; public static string GetExtensionPath(string imageFormat) { switch (imageFormat.ToLower()) { case "pdf": return Pdf; case "csv": return Csv; case "xlsx": return Xlsx; case "pptx": return Pptx; case "docx": return Docx; case "jpeg": return Jpg; case "png": return Png; // Add other cases for different image formats if needed default: // Handle the default case or throw an exception throw new InvalidOperationException("Unsupported image format"); } } public static string GetArtWorkExtensionPath(string imageFormat) { switch (imageFormat.ToLower()) { case "ai": return AI; case "psd": return Psd; // Add other cases for different file types default: // Handle the default case or throw an exception throw new InvalidOperationException("Unsupported file type format"); } } } }