Hi,
I have the async upload working in grids, with saving to disk, sql or Azure. Everything works great.
When I upload to Azure though, it seems the progress bar is for the progress of the temp file going to server, then it takes the same amount of time with the blinking yellow light, to complete the upload to Azure.
Is this normal? Or can I bypass the temp file going to the web server and go straight to Azure ?
Thanks
Eric
I have the async upload working in grids, with saving to disk, sql or Azure. Everything works great.
When I upload to Azure though, it seems the progress bar is for the progress of the temp file going to server, then it takes the same amount of time with the blinking yellow light, to complete the upload to Azure.
Is this normal? Or can I bypass the temp file going to the web server and go straight to Azure ?
Thanks
Eric
<
telerik:RadAsyncUpload
runat
=
"server"
ID
=
"RadAsyncUpload1"
OnClientFilesUploaded
=
"filesUploaded"
HttpHandlerUrl
=
"~/AzureHandler.ashx"
MultipleFileSelection
=
"Automatic"
Width
=
"300px"
>
</
telerik:RadAsyncUpload
>
public class AzureHandler : AsyncUploadHandler, System.Web.SessionState.IRequiresSessionState
{
protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
{
SampleAsyncUploadResult result = CreateDefaultUploadResult<
SampleAsyncUploadResult
>(file);
SampleAsyncUploadConfiguration sampleConfiguration = configuration as SampleAsyncUploadConfiguration;
string container = null;
if (sampleConfiguration != null)
{
container = sampleConfiguration.ContainerName;
result.ImageID = InsertImage(file, container, sampleConfiguration.MetaTags);
}
// Populate any additional fields into the upload result.
// The upload result is available both on the client and on the server
return result;
}
public int InsertImage(UploadedFile file, string containerName, string metaTags)
{
AzureAcess.UploadToCloud(containerName, file, metaTags);
return 0;
}
}