fix upload
This commit is contained in:
+1
-1
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user