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

IFrame module is used

3 Answers 72 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Shahi
Top achievements
Rank 1
Shahi asked on 29 Jul 2013, 09:11 AM
Hi guys

I was trying to manually upload files and thought that IE uses the SL module for uploading files. I have read the same thing and when I checked I found that the IFrame is being used and I didnt add any js code to disable the silverlight. I was trying the exact manual upload sample in the demo.

Thanks
Shahi.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Jul 2013, 09:44 AM
Hi Shahi,

This is an expected behavior of RadAsyncUpload in IE browsers. Please note that when manual upload is used under IE 9/8/7 the Upload Module is automatically set to IFrame.

Thanks,
Shinu.
0
Shahi
Top achievements
Rank 1
answered on 29 Aug 2013, 08:14 AM
Hi shinu. Once all the files are uploaded on the server how can I alert the total uploaded data in mb?

Please help
0
Shinu
Top achievements
Rank 2
answered on 29 Aug 2013, 10:26 AM
Hi Shahi,

Please have a look at the full code I tried which works fine at my end.

ASPX:
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" PostbackTriggers="RadButton1"
    TargetFolder="~/Images/Img/" AllowedFileExtensions=".jpg,.zip" MaxFileSize="579371152"
    MultipleFileSelection="Automatic" UploadedFilesRendering="BelowFileInput" OnFileUploaded="RadAsyncUpload1_FileUploaded">
</telerik:RadAsyncUpload>
<br />
<telerik:RadButton ID="RadButton1" runat="server" Text="Upload" OnClick="RadButton1_Click">
</telerik:RadButton>

C#:
float TotalBytesUploaded;
 
protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
{
    TotalBytesUploaded += e.File.ContentLength;
    string targetfolder = RadAsyncUpload1.TargetFolder;
    e.File.SaveAs(Path.Combine(Server.MapPath(targetfolder), e.File.FileName));
}
 
protected void RadButton1_Click(object sender, EventArgs e)
{
    float megabytes = TotalBytesUploaded / 1048576;
    string totalsize = "Total Uploaded Size : " + megabytes.ToString("f2") + " MB";
    Response.Write("<script>alert('" + totalsize + "')</script>");
}

Thanks,
Shinu.
Tags
AsyncUpload
Asked by
Shahi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Shahi
Top achievements
Rank 1
Share this question
or