|
Rank: Member Groups: Member
Joined: 10/17/2008 Posts: 20
|
HI
When I am uploading the file using Ajax uploader, the Progress bar shows 100% and its upload the file in temp location but Web Browsers Status bar running forever until i kill the web page.
The code i m using is as shown below I am assigning the TempFileLocation at runtime on page load also in users machine even if the file get uploaded it take some time to display the uploaded file name.
<eo:AJAXUploader ID="AJAXUploader1" runat="server" Width="600px" Rows="3" MaxDataSize="100000" AllowedExtension=".tif|.pdf|.doc|.jpeg|.jpg" OnFileUploaded="AJAXUploader_FileUploaded" ClientSideOnDone="on_uploader_start"> <LayoutTemplate> <table border="0" cellpadding="2" cellspacing="0" width="600px" class="normalBlack"> <tr> <td> <asp:PlaceHolder ID="InputPlaceHolder" runat="server">Input Box Place Holder</asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button ID="UploadButton" runat="server" Text="Upload" /> </td> </tr> <tr> <td> <eo:ProgressBar ID="ProgressBar" runat="server" ControlSkinID="Windows_XP"> </eo:ProgressBar> </td> </tr> <tr> <td> <asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server">Progress Text Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button ID="CancelButton" runat="server" Text="Cancel" /> </td> </tr> <tr> <td> <div class="textWhite" id="divButton" style="display: none"> Use the “Browse” buttons to select more files to upload.<br /> <asp:Button ID="btnUpload" runat="server" CssClass="text_xx-small" Height="23px" Width="72px" Text="Submit"></asp:Button><br /> </div> <div class="textWhite" id="divFileMsg" style="display: none"> Remove unwanted file(s) prior to submission by checking the corresponding check box(es) next to the file name.</div> <asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server">Posted Files Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button ID="DeleteButton" runat="server" Text="Delete Selected Files" /> </td> </tr> </table> </LayoutTemplate> </eo:AJAXUploader>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You should avoid changing TempFileLocation for the uploader because uploader stores status files in that folder and rely on those files across post backs. Try to use a fixed TempFileLocation and see if it works for you. If it still doesn't, please try to create a test page/project that demonstrates the problem. Once we have that we will be happy to take a look.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 10/17/2008 Posts: 20
|
I have assigned TempFileLocation from the aspx page but still I am getting the same issue. I have created a sample application, where should I send it/upload?
|
|
Rank: Member Groups: Member
Joined: 10/17/2008 Posts: 20
|
I created a new Web Application Project in VS 2005. In Default.aspx, I have below code... <script type="text/javascript"> function CleanUpDemo() { //Avoid this demo's state information to interfere other //demos since they all use the same ID AJAXUploader1 var uploader = eo_GetObject("AJAXUploader1"); if (uploader) uploader.unload(); } function on_uploader_start() { alert('Done'); } </script>
<body> <form id="form1" runat="server"> <div> <eo:AJAXUploader runat="server" ID="AJAXUploader1" Width="520px" Rows=3 TempFileLocation="C:\Inetpub\wwwroot\WebUploaderTest\eo_upload\" MaxDataSize="100000" ClientSideOnDone="on_uploader_start"> <LayoutTemplate> <TABLE cellSpacing="0" cellPadding="2" width="520" border="0"> <TR> <TD width="99%"> <asp:PlaceHolder id="InputPlaceHolder" runat="server">Input Box Place Holder</asp:PlaceHolder> </TD> </tr> <tr> <TD> <eo:ProgressBar id="ProgressBar" runat="server" ControlSkinID="None" Height="18px" Width="150px" BorderColor="#336699" BorderStyle="Solid" BorderWidth="1px" IndicatorColor="Green"></eo:ProgressBar> </TD> </TR> <tr> <TD> <asp:Button id="UploadButton" runat="server" Text="Upload"></asp:Button> </TD> </tr> <TR> <TD> <asp:PlaceHolder id="PostedFilesPlaceHolder" runat="server">Posted Files Place Holder </asp:PlaceHolder> <asp:Button id="DeleteButton" runat="server" Text="Delete Selected Files"></asp:Button> <p> </p> </TD> </TR> </TABLE> </LayoutTemplate> </eo:AJAXUploader> </div> </form> </body>
When I run this, after hitting upload button, I see progressbar reach 100%, but IE 6.0 status bar never completes. It gets stuck to maybe 30-40%.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We tested your code and it works fine here. Have you tried the test page in a empty new project?
Thanks
|
|
Rank: Member Groups: Member
Joined: 10/17/2008 Posts: 20
|
I sent a sample project yesterday in which we are experiencing same issue, can you plz take a look?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Yes. We have the projects. We will look into it and get back to you as soon as possible.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We looked into the sample project. The project did not run correctly in our environment because AJAX was not correctly configured in your web.config. Once we correct that everything runs fine. "on_uploader_start" was called once the upload is done. Note the file will be in temp directory until the page posts back, at which point you would then handle the uploader's FileUploaded event and move it to wherever you would want it to be.
Thanks
|
|
Rank: Member Groups: Member
Joined: 10/17/2008 Posts: 20
|
Hi
"on_uploader_start" I m just expanding the size of the CollapsiblePanelExtender and making some 'DIV' visible. and the files got moved from Temp folder on Submit Button. so the issue is after upload and before Submit. Even if the file is moved to Temp location the Status bar on IE is keep running which makes false impression to the user that its still uploading. and what is the Web config change you made, as the sample project which i sent you is running with the issue i have mentioned. can you plz provide me that web.config change so i can try with that change.
function on_uploader_start() { var behavior = $find("CollapsiblePanelExtender1"); behavior.set_ExpandedSize('275'); behavior._doOpen() document.getElementById('divFileMsg').style.display = "block"; document.getElementById('divButton').style.display = "block"; }
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The browser progress bar is not something we can control precisely. So if that is the only problem, then there probably isn't much we can do. However if the files are not uploaded correctly, or the uploader's progress bar does not move during upload, then we can look into it.
The changes we made in web.config are standard ASP.NET AJAX configuration items based on ASP.NET AJAX 2.0 and above (your project seems to be using 1.0). You can just install AJAX 2.0 or 3.5 and create a new project based on it and then either copy entries in the new web.config over to your old web.config or copy your code from your old project to the new project.
As always, you want to make sure you are running the latest version of EO.Web Controls (7.0.27) first.
Thanks
|
|
Rank: Member Groups: Member
Joined: 10/17/2008 Posts: 20
|
ok so what happens after on_uploader_start()..is there any events running ones the files are copied to temp location and until we hit Submit button..which might be keeping IE busy?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Nothing really happens after ClientSideOnDone (I am not sure why you name the handler on_uploader_start, but it doesn't matter). The uploader just remembers that you have already uploaded a file and when you page submits, it calls your event handler/move the uploaded file for you.
|
|