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

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

0 Answers 524 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Telerik Admin
Top achievements
Rank 1
Telerik Admin asked on 20 Jul 2010, 10:47 AM
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>
Tags
AsyncUpload
Asked by
Telerik Admin
Top achievements
Rank 1
Share this question
or