fix upload

This commit is contained in:
2020-02-18 07:13:16 +08:00
parent 26753657b8
commit 116dd1a808
+1 -1
View File
@@ -72,7 +72,7 @@ namespace YYApi.Helpers
var realPath = Directory.GetCurrentDirectory() + "/wwwroot" + filePath; var realPath = Directory.GetCurrentDirectory() + "/wwwroot" + filePath;
if (!Directory.Exists(realPath)) if (!Directory.Exists(realPath))
{ {
Directory.CreateDirectory(filePath); Directory.CreateDirectory(realPath);
} }
var fn = fileName + (string.IsNullOrEmpty(ext) ? string.Empty : $".{ext}"); var fn = fileName + (string.IsNullOrEmpty(ext) ? string.Empty : $".{ext}");
File.WriteAllBytes(realPath + fn, bt); File.WriteAllBytes(realPath + fn, bt);