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

Upload doesn't work anymore

4 Answers 67 Views
Upload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vamshi
Top achievements
Rank 1
Vamshi asked on 18 Jul 2011, 10:24 PM
I know it sounds weird but I had upload working and it stopped working for me now. There have been no changes to the code that deals with File Upload.

My controller still gets called but 'attachments' is null. I have used Network Capture to see what is going on. And since I have a released build I see this in the Request Body

-----------------------------7db43990220
Content-Disposition: form-data; name="attachments"; filename="sample.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

And in the new build that doesn't work the Request Body is

-----------------------------7db224262a0808
Content-Disposition: form-data; name=""; filename="D:\Dropbox\sample.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document


The name parameter in Content-Disposition is empty in the case it doesn't work. And the attachments parameter is null when my controller action gets control. Why would this be ever null?

4 Answers, 1 is accepted

Sort by
0
Vamshi
Top achievements
Rank 1
answered on 18 Jul 2011, 10:39 PM
More information: I'm using Asynchronous upload - set to upload files automatically.
0
T. Tsonev
Telerik team
answered on 19 Jul 2011, 07:03 AM
Hi Vamshi,

I don't see a code path in the Upload that might lead to the name being cleared out. We'll need to reproduce the issue in order to fix it.

Did the issue occur upon upgrading to the official 2011.2.712 release? What version were you using before?

What browser are you using? Is the problem reproducible other browsers as well?

Greetings,
Tsvetomir Tsonev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Marco Teodoro
Top achievements
Rank 1
answered on 17 May 2012, 01:47 PM
Hello i have the same issue.

I have not updated the dll version. in firebug i see the file being posted  and on the controller action i can see the file through the controller context like this
this.ControllerContext.HttpContext.Request.Files[0]

So i would say that this is a model binding issue. i will work around this using the controller context for now because i don't have time right now to continue hunting this bug.

I hope someone within Telerik or community,  found the real issue before i have time to spend on this.

Best regards, Marco
0
T. Tsonev
Telerik team
answered on 18 May 2012, 06:52 AM
Hello,

This issue still remains a bit of a mystery to us. What is the signature of your action method?

Regards,
Tsvetomir Tsonev
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
Upload
Asked by
Vamshi
Top achievements
Rank 1
Answers by
Vamshi
Top achievements
Rank 1
T. Tsonev
Telerik team
Marco Teodoro
Top achievements
Rank 1
Share this question
or