i am using Kendo upload feature. While have set uploadmultiple option to true and autoupload to false.
If i select 2 files and click on Upload Button, the Save API function is called 2 times, once for each file.
Is it possible to call this function only once with both attachments passed in the parameter ?
<input name="attachments" type="file" id="attachments" />
<script type="text/javascript">
$(document).ready(function () {
$("#attachments").kendoUpload({
async: {
saveUrl: '@Url.Action("Save", "AppConfig")',
autoUpload: false,
allowmultiple: true
}
});
});
</script>
[HttpPost]
public ActionResult Save(IEnumerable<HttpPostedFileBase> attachments)
{
if (SaveFiles(attachments)
{
return Content("");
}
else
{
return Content("error");
}
}