Я пытаюсь использовать асинхронную загрузку Kendo UI на странице Razor (без контроллера), но получаю ошибку 404
Index.cshtml page-
<div class="row">
<div class="">
<form asp-action="" class="" id="" enctype="multipart/form-data">
<div class="form-group">
<label class="">Review Type</label>
<div class="">
<select asp-for="ReviewType" asp-items="@(new SelectList(Model.ReviewTypes, "ReviewTypeLookupId", "ReviewTypeName"))" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class=""></label>
<div class="">
@(Html.Kendo().Upload()
.Name("files")
.Async(a => a
.Save("Index?handler=Save", "UploadManagement")
.Remove("Remove", "UploadManagement/Index")
.AutoUpload(true)
)
)
</div>
</div>
<div class="form-group">
<button type="submit" id="submit-all" class="btn btn-default">Upload </button>
</div>
</form>
</div>
Index.cshtml.cs Page
[HttpPost]
public ActionResult OnPostSave(IEnumerable<IFormFile> files)
{
// The Name of the Upload component is "files"
if (files != null)
{
foreach (var file in files)
{
//var fileContent = ContentDispositionHeaderValue.Parse(file.ContentDisposition);
//// Some browsers send file names with full path.
//// We are only interested in the file name.
//var fileName = Path.GetFileName(fileContent.FileName.Trim('"'));
//var physicalPath = Path.Combine(HostingEnvironment.WebRootPath, "App_Data", fileName);
//// The files are not actually saved in this demo
////file.SaveAs(physicalPath);
}
}
// Return an empty string to signify success
return Content("");
}
Ошибка -
Не удалось загрузить ресурс: сервер ответил со статусом 404 (не найдено)