This is a migrated thread and some comments may be shown as answers.

Multiple Kendo Upload control files not passing to controller part in dot net core mvc

1 Answer 974 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Sasp
Top achievements
Rank 1
Sasp asked on 22 Oct 2020, 11:33 AM

I have multiple KendoUpload control in my page and I have a custom submit button. By clicking submit whichever upload control having data those to be submitted to dot net core controller part. I am good to submit one KendoUpload value, but not able to pass multiple upload values into controller part at one shot.
I am also passing other input values along with upload file. This is a single upload process, I am following. In the controller part, I am receiving by IFormFile.
Any suggestion?

public async Task<IActionResult> UploadImage(IEnumerable<IFormFile> files, ReportComponentVM subVM)
        {
            try
            {
                if (files != null)
                {
                    await AttachmentFileSave(false, files.FirstOrDefault(), "test", "test2",1);
                }
                return Json(new JsonResponse { Message = "UploadImage", IsSuccess = true });
            }
            catch (Exception ex)
            {
                return Json(new JsonResponse { Message = ex.Message, IsSuccess = false });
            }
        }

1 Answer, 1 is accepted

Sort by
0
Aleksandar
Telerik team
answered on 26 Oct 2020, 06:45 AM

Hi Sasp,

I already provided a suggestion in the other forum thread on the same issue, here:

https://www.telerik.com/forums/multiple-upload-controls-in-mvc-view#dWaYkong2UyHCZRcsZNU3w

Give the suggestion a try and let me know if it helps. I would also like to ask you to keep the conversation on the issue in a single thread, so we don't miss a crucial detail when discussing the issue. 

Regards,
Aleksandar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Upload
Asked by
Sasp
Top achievements
Rank 1
Answers by
Aleksandar
Telerik team
Share this question
or