refactoring fs
This commit is contained in:
@ -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()
|
||||
{
|
||||
|
@ -29,14 +29,13 @@ using Yavsc.Services;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
|
||||
public partial class Startup
|
||||
{
|
||||
public static string ConnectionString { get; private set; }
|
||||
public static string UserBillsDirName { private set; get; }
|
||||
public static string UserBillsDirName { private set; get; }
|
||||
public static string Authority { get; private set; }
|
||||
public static string Audience { get; private set; }
|
||||
public static SiteSettings SiteSetup { get; private set; }
|
||||
public static SiteSettings SiteSetup { get; private set; }
|
||||
|
||||
private static ILogger logger;
|
||||
public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv)
|
||||
@ -326,12 +325,8 @@ namespace Yavsc
|
||||
Audience = siteSettings.Value.Audience;
|
||||
|
||||
ConfigureOAuthApp(app, siteSettings.Value);
|
||||
|
||||
app.UseWebSockets();
|
||||
|
||||
app.UseSignalR("/api/signalr");
|
||||
|
||||
ConfigureFileServerApp(app, siteSettings.Value, env);
|
||||
ConfigureWebSocketsApp(app, siteSettings.Value, env);
|
||||
|
||||
app.UseRequestLocalization(localizationOptions.Value, (RequestCulture)new RequestCulture((string)"en"));
|
||||
|
||||
@ -348,3 +343,4 @@ namespace Yavsc
|
||||
}
|
||||
|
||||
}
|
||||
//
|
Reference in New Issue
Block a user