refactoring fs
This commit is contained in:
parent
c47e2b4621
commit
5617a543eb
8 changed files with 98 additions and 68 deletions
|
|
@ -16,12 +16,10 @@ namespace Yavsc
|
|||
public void ConfigureFileServerApp(IApplicationBuilder app,
|
||||
SiteSettings siteSettings, IHostingEnvironment env)
|
||||
{
|
||||
UserFilesDirName = Path.Combine(
|
||||
env.WebRootPath,
|
||||
siteSettings.UserFiles.DirName);
|
||||
var userFilesDirInfo = new DirectoryInfo( siteSettings.UserFiles.DirName );
|
||||
UserFilesDirName = userFilesDirInfo.FullName;
|
||||
|
||||
var rootInfo = new DirectoryInfo(UserFilesDirName);
|
||||
if (!rootInfo.Exists) rootInfo.Create();
|
||||
if (!userFilesDirInfo.Exists) userFilesDirInfo.Create();
|
||||
|
||||
UserFilesOptions = new FileServerOptions()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue