To use the built-in Azure Blob provider that comes with RadCloudUpload, you must:
RadCloudUpload can upload files to Azure Blob Storage. It is built on the top of Windows Azure Blob Storage Service in .NET. To work properly, the control needs a reference to some of the client libraries included in the Windows Azure Storage which is a part of Windows Azure SDK for .NET.
The Windows Azure Storage package is distributed through a NuGet feed and can be easily installed through the Package Management Console. Table 1 shows the command to install the version you need according to the Telerik.Web.UI version you use.
|Telerik.Web.UI version||Targetting .NET 4.0 and later||Targetting .NET 3.5|
|>= 2014.1.225||Install-Package WindowsAzure.Storage -Version 3.0.2||Install-Package WindowsAzure.Storage -Version 126.96.36.199|
|< 2013.3.1324||Install-Package WindowsAzure.Storage -Version 188.8.131.52||Install-Package WindowsAzure.Storage -Version 184.108.40.206|
3.0.2, only the
Microsoft.WindowsAzure.Storage.dll assembly with version
220.127.116.11 is used by RadCloudUpload.
18.104.22.168, only the
Microsoft.WindowsAzure.StorageClient.dll assembly with version
6.0.6002.18488 is used by RadCloudUpload.
Microsoft.WindowsAzure.Configuration.dll assembly is not used, but the other dependencies may be used by the Azure code.
When a Web Application type of project is used the Copy Local property in the Reference Properties dialog box, available from the References pane of the Project Designer must be set to True .
If you use newer versions of the
WindowsAzure.Storage package, there is a risk of a breaking change in the library to break RadCloudUpload. File uploads may stop working or you may get errors such as
From the RadCloudUpload's smart tag choose Azure as provider tag and open the Configuration Wizard:
In the Configuration Wizard dialog enter Azure Access Key, Account Name and Blob Container Name.Specifying the Uncommitted Files Expiration Period(TimeSpan Structure), you could easily configure the time, after which the unprocessed files will be removed from the storage.When Ensure Container is checked, the control will create a new Container if it doesn't exists. In case it is not checked and the Container doesn't exists - an exception will be thrown.This will add configuration setting in the web.config file:
<telerik.web.ui> <radCloudUpload> <storageProviders> <add name="Azure" type="Telerik.Web.UI.AzureProvider" accountKey="" accountName="" blobContainer="" subFolderStructure="" ensureContainer="true" uncommitedFilesExpirationPeriod="2" defaultEndpointsProtocol="https" /> </storageProviders> </radCloudUpload> </telerik.web.ui>
Uploading in Azure is done on chunks. Every chunk has size of 2MB. These chunks that were cancelled during the uploading are removed automatically by Azure. When older browsers are used (IE9 or below), files are uploaded at once, because chunking is not supported. In order to upload files larger than 4MB, it is needed to increase the maximum allowed file size. For more details please refer to this article.