FIX: RadAsyncUpload sometimes does not save the uploaded files to the target folder.

Thread is closed for posting
1 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 20 Jul 2010 Link to this post

    Problem: RadAsyncUpload sometimes fail to upload the files to the target folder.

    Reason: The temporary files, which RadAsyncUpload uses internally to save the uploaded files to the target folder, are being deleted too early, hence leaving the upload without files to save.

    Solution: We have fixed the problem for the latest internal build (version 2010.2.722+). More information on how to obtain the latest internal build can be found here.

    Alternatively, you can do the following:

    Step 1: Add an ashx handler to your app. Inside, use the following code:

    <%@ WebHandler Language="C#" Class="CustomHandler" %>
     
    using System;
    using System.Web;
    using Telerik.Web.UI;
     
    public class CustomHandler : AsyncUploadHandler {
        protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
        {
            configuration.TimeToLive = TimeSpan.FromHours(4);
            return base.Process(file, context, configuration, tempFileName);
        }
    }

    Step 2: set the HttpHandlerUrl property of RadAsyncUpload to point to that handler. Like this:

    <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" HttpHandlerUrl="~/CustomHandler.ashx" TargetFolder="~/Documents">
            </telerik:RadAsyncUpload>
Back to Top