create empty file
This commit is contained in:
@ -13,6 +13,15 @@ if (!app.Environment.IsDevelopment())
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
// create file
|
||||
var configuration = app.Services.GetService<IConfiguration>();
|
||||
var filePath = configuration["ContentFilePath"];
|
||||
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
File.WriteAllText(filePath, string.Empty);
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
|
Reference in New Issue
Block a user