Telerik blogs

y-u-no-use-async-uploadIt’s weird that RadAsyncUpload, Telerik’s next-generation ASP.NET upload control, was introduced more than 2 years ago and while its functionality is times richer than the one of RadUpload, the latter is still one of our most widely used controls and the former simply stays in the shadow. People continue recommending our older Upload control in community forums, our customers continue to use it in new projects and we just don’t get it.

This blog post is aimed at explaining why Telerik’s Async Upload is better for new project development and what you will win by migrating RadUpload to it. We will also point you to some useful resources to help you migrate painlessly. 

NOTE 1: I’d like to say something important, so stay with me. Starting tomorrow, all RadUpload demos will be marked as Obsolete and that’s not because we have stopped supporting the control, but because we are trying to show our new customers that it’s not the best thing we have to offer to satisfy their needs. 

NOTE 2: We are indeed planning on discontinuing the support for RadUpload in June 2013 (Q2’13), although it will still be available in the suite. We are positive that RadAsyncUpload can better serve your upload needs and we kindly ask you to transition to it to make sure you take advantage of its support and the new features we constantly add to it.

So…Why Should You Use RadAsyncUpload?

RadAsyncUpload has a ton of functionality on top of RadUpload. Here’s what you win by using the new control, as well as links to demos showing how you can implement this functionality in your scenarios: 

1) In the first place, our AsyncFileUpload control supports file uploads using AJAX. The biggest limitation of our old upload is that it requires full page postback to send the files to the server. Well, no longer! With RadAsyncUpload, the files are uploaded in a fully asynchronous manner to the server, which leads to a smoother experience for your application. The good part is that the AJAX functionality is integrated into the upload so that you don’t have to write a single line of code. 

2) Our new ASP.NET upload supports “real” multiple file selection. What does this mean? Well, it means that users will be able to select a couple of files from the same file dialog and send them to the server with a single action. 

3) There is a client-side validation by size! This is one of the major weaknesses of the old upload and it turned out to be a real show stopper for some of our customers. With the Async Upload you can validate the size on the client and avoid round-tripping to the server in case of invalid file. 

4) RadAsyncUpload supports drag-and-drop file uploads in all HTML5-compliant browsers (FireFox, Chrome, Safari and IE10). 

5) Telerik’s Async Upload can persist uploaded files across postbacks until a specific button is pressed. This was a common request and is a huge benefit compared to the classic RadUpload, which will upload the select files to the server no matter what action triggered the postback. 

Here’s How to Painlessly Migrate to the New (Old) Control

We did everything possible to make your transition from RadUpload to RadAsyncUpload effortless. The look of the two controls is identical and there are just a few differences in the setup. The upload process with the Async Upload control requires that the files are uploaded to a custom handler and not to the hosting page. In addition, the files are stored in a temporary location until a postback occurs, after which the location cleans automatically. 

Practically, the transition is as easy as 1-2-3:

1) Since RadAsyncUpload uses an HTTP handler to manage file uploads, make sure that you have registered the handler's URL in the web.config using the control’s Smart Tag. 

2) Replace the old declaration
<telerik:RadUpload …></telerik:RadUpload>
with the new one:
<telerik:RadAsyncUpload …></telerik:RadAsyncUpload>

3) You can leave all old properties intact because we have made them identical for both controls. 

4) [Optional] Set the MultipleSelection property to Automatic. This will enable multiple file selection on all common browsers.

5) [Optional] Set the TemporaryFolder property. In the common case it can be any folder with a couple exceptions:
a. In Medium Trust this must be a folder that is inside your application folder.
b. In a Web farm environment, the TemporaryFolder as well as the TargetFolder properties must be set to folders located in share drive

You can find more detailed information in RadAsyncUpload’s online documentation

In the Hands of the Decision-Maker

So next time you need an advanced ASP.NET upload control, at least give RadAsyncUpload a chance, please. It allows your users to do the stuff they are so used to – selecting multiple files, uploading files with drag and drop, working on other things, while the files are uploading. The migration to the control is a breeze, so the sooner you do it, the better. If for some reason RadUpload is better-suited for your custom scenarios (and you’ll really surprise us with this one), please share with us how we can make RadAsycnUpload better. As usual, your opinion and sincere feedback are what Telerik’s ASP.NET AJAX team counts on! 

We really believe we can make your life easier with RadAsyncUpload, so y u no use it? :-)


Genady-Sergeev
About the Author

Genady Sergeev

is a Senior Manager in the Progress Web UI & Tools division, which develops the Kendo UI, UI for ASP.NET MVC and UI for ASP.NET AJAX products. He joined the company back in 2009 and since then he has been involved with the web UI products on a variety of levels, from a single contributor to a senior manager. Genady's main interests are in the field of client-side development and he is a big fan of the DevOps philosophy. In his free time he likes skiing and cross-country cycling.

Related Posts

Comments

Comments are disabled in preview mode.