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

NULL IEnumerable<HttpPostedFileBase> files parameter

2 Answers 267 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Leandro
Top achievements
Rank 1
Leandro asked on 30 Jul 2020, 01:37 PM

Hi,

I'm having the same problem. I already check the name input matching the controller parameter, but still getting a null  IEnumerable<HttpPostedFileBase>. I'm out of new solutions, so any help will be appreciated.

Please, find my project in attach. I try via normal-save and chunck-mode, without sucess. 

Best regards, 

Leandro Alves

2 Answers, 1 is accepted

Sort by
0
Leandro
Top achievements
Rank 1
answered on 30 Jul 2020, 03:29 PM

I think I figure out the problem. When working with WebApi on server side we should not send HttpPostedFileBase as parameter, since there already a collection under HttpContext.Current.Request.Files that aggregate all uploaded files from client via formData. So, I changed my code accordingly and guess what, works perfectly.

Anw, thanks for your time, 

Regards, 

Leandro Alves

0
Martin
Telerik team
answered on 03 Aug 2020, 08:48 AM

Hello Leandro,

I am glad that you were able to resolve the problem.

If you are experiencing any further issues, do not hesitate to get back to us.

Regards,
Martin
Progress Telerik

Tags
Upload
Asked by
Leandro
Top achievements
Rank 1
Answers by
Leandro
Top achievements
Rank 1
Martin
Telerik team
Share this question
or