Hello,
I have posted the following question on Stack Overflow :
https://stackoverflow.com/questions/60001543/telerik-upload-control-in-mvc-core-upload-file-twice-in-ajax-and-with-final
Basically, I need to be able to post the file in a Telerik Upload control twice : in async mode (works fine), and at final POST of the form with a submit button. The file is not posted with the submit button in form, despite the form seem to be correctly declared.
I guess this is due to the fact to have enabled Async mode on the upload control.
The control is defined like this :
@(Html.Kendo().Upload()
.Name("fileUpload")
.Multiple(false)
.Async(a => a
.Save("AnalyzeFile", "Request")
.AutoUpload(true)
)
.Events(e => e.Success("onUploadOperationSuccess"))
.Validation(validation => validation.AllowedExtensions(new[] { ".csv" }))
.HtmlAttributes(new { style = "width:100%" }))
and the form :
@using (Html.BeginForm("Save", "Request", FormMethod.Post, new { @class = "form-horizontal", id = "requestForm", enctype="multipart/form-data" }))
{
...
<
button
id
=
"finalSubmit"
type
=
"submit"
class
=
"k-button k-primary"
>Valider</
button
>
}
You can find more details (but the most important part is here) in previous link.
Thanks for help