RadControls for ASP.NET AJAX
RadAsyncUpload offers asynchronous upload capability while maintaining the look of the regular RadUpload control.The upload process requires that the files are uploaded to a custom handler and not to the hosting page. Files are stored in a temporary location until a postback occurs. The temporary location is cleaned-up automatically.
Internally, RadAsyncUpload can choose between three modules for uploading - IFrame, Flash and Silverlight. The module with higher priority is Silverlight. If there is no Silverlight installed on the client machine, RadAsyncUpload will utilize the Flash module. If there is no Flash as well, RadAsyncUpload will use the IFrame module which is supported out of the box on all browsers.
The control supports Web Farm scenarios. Upload progress is available in this scenario as long there is Flash/Silverlight installed on the client machine.
RadAsyncUpload relies on saving temporary files to work. When posted, files are saved to the designated temp folder (App_Data/RadUploadTemp by default) with unique names. Once a postback occurs the RadAsyncUpload fires the OnFileUploaded event for each file. The target file is passed as part of the arguments to the event and can be set as either valid (default) or invalid. After the events fire, all files marked as valid are automatically saved to the TargetFolder if it’s set.
Finally, all processed temporary files are deleted. Temporary files are also deleted after a set amount of time defined by the TemporaryFileExpiration property.
With Q1 2011 SP2 RadAsyncUpload supports setting the temporary folder globally in the appSettings section of the web.config.
< add key="Telerik.AsyncUpload.TemporaryFolder" value="[path_to_the_temporary_folder]" />
The path can be relative or absolute.
Validation differs from RadUpload as it is now possible to validate size on the client, as long as there is Silverlight or Flash installed on the client's browser. If thevalidation fails, RadAsyncUpload will fire the OnClientValidationFailed.
In web farms, each server will need to use the same MachineKey as RadAsyncUpload uses it for encryption. Most web farms should already have their MachineKeys synchronized as this is the recommended approach for web farm deployment.