RadUpload or RadAsyncUpload?

Thread is closed for posting
5 posts, 0 answers
  1. Carl
    Carl avatar
    2 posts
    Member since:
    Jul 2010

    Posted 02 Aug 2010 Link to this post

    I'm trying out the upload controls on MVC, but I'm having some small problems.

    When I'm using RadUpload, the Progress is only showed on really large files. However when that happens, the controller action is triggered before recieving the file, so I get no file in the action, and later an uploaded file that the server never notice.

    When I'm using RadAsyncUpload it seems to upload nicely, but I can't figure out how I should reach the files in the controller action when eventually posting the form.

    Any ideas or opinions?
  2. Carl
    Carl avatar
    2 posts
    Member since:
    Jul 2010

    Posted 02 Aug 2010 Link to this post

    Wow. Debugging this was very interesting to me.
    RadUpload with progress works, and I'll stick to that for time being.

    Following are my observations:
    If a breakpoint is placed in the controller at an early stage, the file will never be posted to the action. The action will just perform like no file has been entered in the form. After the fileupload is finished in the gui, nothing more happens at the server.

    If no breakpoint exists in the action, the action is entered almost immediately after submit, and the first time Request.Form is accessed in code, the execution halts. It waits until the file is completely uploaded and the progressbar in the gui has finished.
    After that the action is resumed.
    This behavior can be observed by tracing. I guess it's implemented by some mutex in the Request.Form.
  3. T. Tsonev
    T. Tsonev avatar
    2794 posts

    Posted 05 Aug 2010 Link to this post

    Hello Carl,

    Thank you for sharing your findings with us and the community. When the debugger alters the behavior of the program.

    RadAsyncUpload works in completely different manner and you won't receive the file in the controller directly. Normally, the file is uploaded to a handler and saved in a temporary folder until the page is submitted or the set timeout expires. You can skip this step and store the file directly in the handler as in the images uploader demo. Then you can submit information about the uploaded file as part of the form (for example database record ID). With this information the controller action should be able to locate it and process it.

    I hope this helps.

    Tsvetomir Tsonev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. sujith
    sujith avatar
    6 posts
    Member since:
    Dec 2008

    Posted 07 Nov 2012 Link to this post

    Hello, Tsvetomir Tsonev

    Any update on this issue? The link you have provided doesn't seem to be working. 

  5. Plamen
    Plamen avatar
    2816 posts

    Posted 09 Nov 2012 Link to this post

    Hello Sujith,

    Here is the link to the sample demo that shows RadAsyncUpload with custom handler. 

    Hope this will be helpful.

    Kind regards,
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top