Browse Source
Merge pull request #3853 from abpframework/liangshiwei/virtualfilesystem
Add multiple StaticWebAssetsFileProvider
pull/3896/head
Halil İbrahim Kalkan
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
8 deletions
-
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs
|
|
|
@ -99,17 +99,14 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem |
|
|
|
_virtualFileProvider |
|
|
|
}; |
|
|
|
|
|
|
|
if (_hostingEnvironment.IsDevelopment() && |
|
|
|
if (_hostingEnvironment.IsDevelopment() && |
|
|
|
_hostingEnvironment.WebRootFileProvider is CompositeFileProvider compositeFileProvider) |
|
|
|
{ |
|
|
|
var staticWebAssetsFileProvider = compositeFileProvider |
|
|
|
var staticWebAssetsFileProviders = compositeFileProvider |
|
|
|
.FileProviders |
|
|
|
.FirstOrDefault(f => f.GetType().Name.Equals("StaticWebAssetsFileProvider")); |
|
|
|
.Where(f => f.GetType().Name.Equals("StaticWebAssetsFileProvider")).ToList(); |
|
|
|
|
|
|
|
if (staticWebAssetsFileProvider != null) |
|
|
|
{ |
|
|
|
fileProviders.Add(staticWebAssetsFileProvider); |
|
|
|
} |
|
|
|
fileProviders.AddRange(staticWebAssetsFileProviders); |
|
|
|
} |
|
|
|
|
|
|
|
return new CompositeFileProvider( |
|
|
|
@ -127,4 +124,4 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem |
|
|
|
return Options.AllowedExtraWebContentFileExtensions.Any(e => path.EndsWith(e, StringComparison.OrdinalIgnoreCase)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|