This commit is contained in:
Michael 2017-03-25 12:53:07 -04:00
parent a3f14c06c1
commit 6e878a4556

View file

@ -59,12 +59,12 @@ public ActionResult PostSkin(CreateSkinViewModel model)
Directory.CreateDirectory(Server.MapPath(screenshotFolder));
skin.DownloadUrl = Path.Combine(repoFolder, model.SkinFile.FileName);
skin.DownloadUrl = Path.Combine(repoFolder.Remove(0,1), model.SkinFile.FileName);
model.SkinFile.SaveAs(Path.Combine(Server.MapPath(repoFolder), model.SkinFile.FileName));
if (model.ScreenshotFile != null && model.ScreenshotFile.ContentLength > 0)
{
skin.ScreenshotUrl = Path.Combine(screenshotFolder, model.ScreenshotFile.FileName);
skin.ScreenshotUrl = Path.Combine(screenshotFolder.Remove(0, 1), model.ScreenshotFile.FileName);
model.ScreenshotFile.SaveAs(Path.Combine(Server.MapPath(screenshotFolder), model.ScreenshotFile.FileName));
}
db.Skins.Add(skin);