服务端不暂支持 .net framework ,支持最新 .netcore 添加七牛接口的支持,客户端修改了已知的bug 并对layui支持, .net framework版本的可以下载v1.0.0 分支
This commit is contained in:
@@ -26,19 +26,19 @@ namespace Ufangx.FileServices
|
||||
|
||||
public IEnumerable<string> AuthenticationSchemes => options.AuthenticationSchemes;
|
||||
|
||||
public string DefaultSchemeName => options.DefaultTopic;
|
||||
public string DefaultSchemeName => options.DefaultScheme;
|
||||
|
||||
FileServiceScheme GetScheme(string name) {
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
throw new ArgumentException("message", nameof(name));
|
||||
}
|
||||
var topic = options.SchemeMap[name];
|
||||
if (topic == null)
|
||||
var scheme = options.SchemeMap[name];
|
||||
if (scheme == null)
|
||||
{
|
||||
throw new Exception($"无效的文件服务方案名称“{name}”");
|
||||
}
|
||||
return topic;
|
||||
return scheme;
|
||||
}
|
||||
public IFileHandler GetHandler(string schemeName)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Ufangx.FileServices.Models
|
||||
{
|
||||
private readonly IList<FileServiceScheme> _schemes = new List<FileServiceScheme>();
|
||||
private readonly IList<string> _authenticationSchemes = new List<string>();
|
||||
public string DefaultTopic { get; set; }
|
||||
public string DefaultScheme { get; set; }
|
||||
public IEnumerable<FileServiceScheme> Schemes => _schemes;
|
||||
public IEnumerable<string> AuthenticationSchemes => _authenticationSchemes;
|
||||
public IDictionary<string, FileServiceScheme> SchemeMap { get; } = new Dictionary<string, FileServiceScheme>(StringComparer.Ordinal);
|
||||
|
||||
Reference in New Issue
Block a user