优化本地文件上传

This commit is contained in:
不做码农
2022-03-22 22:01:47 +08:00
parent c6acbf407e
commit c23b69a883
5 changed files with 66 additions and 31 deletions

View File

@@ -16,7 +16,7 @@ namespace Infrastructure
public static string GetdirPath(string path = "")
{
DateTime date = DateTime.Now;
string timeDir = Path.Combine(date.ToString("yyyyMMdd"));// date.ToString("yyyyMM/dd/HH/");
string timeDir = date.ToString("yyyyMMdd");// date.ToString("yyyyMM/dd/HH/");
if (!string.IsNullOrEmpty(path))
{
@@ -28,7 +28,7 @@ namespace Infrastructure
/// <summary>
/// 取文件名的MD5值(16位)
/// </summary>
/// <param name="name">文件名,不包括扩展名</param>
/// <param name="str">文件名,不包括扩展名</param>
/// <returns></returns>
public static string HashFileName(string str = null)
{