This commit is contained in:
2025-05-28 13:34:48 -07:00
parent 65a433e9ab
commit 7eba0fa25a
87 changed files with 3775 additions and 1351 deletions

View File

@ -20,6 +20,7 @@ using System.Configuration;
namespace Fab2ApprovalSystem.Utilities;
#if !NET8
public class FileUtilities<T> : Controller // <T> => System.Web.Mvc.FileContentResult
{
@ -28,14 +29,22 @@ public class FileUtilities<T> : Controller // <T> => System.Web.Mvc.FileContentR
var result = File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, pathToFile);
return (T)Convert.ChangeType(result, typeof(T));
}
#else
#endif
#if NET8
public class FileUtilities<T> {
#endif
public byte[] GetFile(string s) {
#if !NET8
FileStream fs = System.IO.File.OpenRead(s);
#else
#endif
#if NET8
FileStream fs = File.OpenRead(s);
#endif
byte[] data = new byte[fs.Length];