public async Task <ActionResult> UploadFont(UploadFontViewModel model) { if (!ModelState.IsValid) { return(View("_UploadFont", model)); } var fontFilePath = SaveFont(model.AttachedFont); await _fontService.CreateAsync(model.FontName, model.FontType, fontFilePath); return(Content("Refresh")); }
public ActionResult UploadFont(UploadFontViewModel model) { if (!ModelState.IsValid) { return(View("_UploadFont", model)); } var fontFilePath = SaveFont(model.AttachedFont, nameof(UploadFont)); var fontId = _fontService.Create(model.FontName, model.FontType, fontFilePath); return(this.Content("Refresh")); }
public ActionResult UploadFont() { var model = new UploadFontViewModel(); return(PartialView("_UploadFont", model)); }