d63ded45e1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
523 B
C#
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);
|
|
}
|
|
}
|