Compare commits

...
1 Commits
Author SHA1 Message Date
xrain 116dd1a808 fix upload 2020-02-18 07:13:16 +08:00
+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);