Merge branch 'master' of https://gitee.com/izory/ZrAdminNetCore
This commit is contained in:
commit
5d39958da2
@ -36,7 +36,7 @@
|
||||
"DemoMode": false, //是否演示模式
|
||||
"Upload": {
|
||||
"uploadUrl": "http://localhost:8888", //本地存储资源访问路径
|
||||
"localSavePath": "uploads", //本地上传默认文件存储目录 wwwroot/uploads, 如果saveType= 2 (请使用完整路径,比如 /home/resource)
|
||||
"localSavePath": "", //本地上传默认文件存储目录 wwwroot
|
||||
"maxSize": 15, //上传文件大小限制 15M
|
||||
"notAllowedExt": [ ".bat", ".exe", ".jar", ".js" ]
|
||||
},
|
||||
|
||||
@ -101,7 +101,7 @@ namespace ZR.Service.System
|
||||
public string GetdirPath(string storePath = "", bool byTimeStore = true)
|
||||
{
|
||||
DateTime date = DateTime.Now;
|
||||
string timeDir = date.ToString("yyyyMMdd");
|
||||
string timeDir = date.ToString("yyyy/MMdd");
|
||||
|
||||
if (!string.IsNullOrEmpty(storePath))
|
||||
{
|
||||
@ -116,8 +116,7 @@ namespace ZR.Service.System
|
||||
{
|
||||
str = Guid.NewGuid().ToString();
|
||||
}
|
||||
MD5 md5 = MD5.Create();
|
||||
return BitConverter.ToString(md5.ComputeHash(Encoding.Default.GetBytes(str)), 4, 8).Replace("-", "");
|
||||
return BitConverter.ToString(MD5.HashData(Encoding.Default.GetBytes(str)), 4, 8).Replace("-", "");
|
||||
}
|
||||
|
||||
public Task<long> InsertFile(SysFile file)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user