Files
MoneyMap/MoneyMap/Services/WebReceiptStorageOptions.cs
T
2026-04-20 18:19:31 -04:00

18 lines
523 B
C#

using MoneyMap.Services;
namespace MoneyMap.WebApp.Services;
public class WebReceiptStorageOptions : IReceiptStorageOptions
{
public string ReceiptsBasePath { get; }
public WebReceiptStorageOptions(IWebHostEnvironment env, IConfiguration config)
{
var relativePath = config["Receipts:StoragePath"] ?? "receipts";
if (Path.IsPathRooted(relativePath))
ReceiptsBasePath = relativePath;
else
ReceiptsBasePath = Path.Combine(env.WebRootPath, relativePath);
}
}