mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
I forgot how filesystems work...
This commit is contained in:
parent
73e2639010
commit
a3f14c06c1
1 changed files with 6 additions and 0 deletions
|
@ -53,6 +53,12 @@ public ActionResult PostSkin(CreateSkinViewModel model)
|
|||
skin.VersionId = "";
|
||||
string repoFolder = $"~/Uploads/{ACL.UserNameRaw(skin.UserId)}/SkinFiles";
|
||||
string screenshotFolder = $"~/Uploads/{ACL.UserNameRaw(skin.UserId)}/Screenshots";
|
||||
if (!Directory.Exists(Server.MapPath(repoFolder)))
|
||||
Directory.CreateDirectory(Server.MapPath(repoFolder));
|
||||
if (!Directory.Exists(Server.MapPath(screenshotFolder)))
|
||||
Directory.CreateDirectory(Server.MapPath(screenshotFolder));
|
||||
|
||||
|
||||
skin.DownloadUrl = Path.Combine(repoFolder, model.SkinFile.FileName);
|
||||
model.SkinFile.SaveAs(Path.Combine(Server.MapPath(repoFolder), model.SkinFile.FileName));
|
||||
|
||||
|
|
Loading…
Reference in a new issue