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

Attachments Null

2 Answers 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Santhosh
Top achievements
Rank 1
Santhosh asked on 09 Apr 2012, 10:58 AM
Team

I've been trying the uploader controller specified in http://demos.telerik.com/aspnet-mvc/upload
public ActionResult Save(IEnumerable<HttpPostedFileBase> attachments) but Iam getting attachments null.
Kindly request your help.

I've used the same controller and  View except configurator.

2 Answers, 1 is accepted

Sort by
0
Marco Teodoro
Top achievements
Rank 1
answered on 17 May 2012, 12:50 PM
have you found your error?

i'm having the same issue now.

Best Regards,Marco
0
Daniel
Telerik team
answered on 22 May 2012, 08:25 AM
Hello,

Basically the name with which the files are posted should be the same as the name set to the Upload e.g.
Html.Telerik().Upload()
    .Name("attachments")
     
 public ActionResult Save(IEnumerable<HttpPostedFileBase> attachments)
For asynchronous uploads the name will be different if you have specified the field name parameter in the Save action configuration:
Html.Telerik().Upload()
    .Name("attachments")
    .Async(async => async
        .Save("Save", "Upload","DifferentName")
If the Upload name is the same as the parameter and it hasn't been modified from the configuration, I will need some code in order to investigate further.

Greetings,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
General Discussions
Asked by
Santhosh
Top achievements
Rank 1
Answers by
Marco Teodoro
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or