Hi all,
I'm experiencing a strange behavior of the uploader.
When I try to upload a large file (~40M), sometimes, not always, the uploader doesn't start working. When I click on the upload button, the button becomes disabled, but the progress bar doesn't show anything and the cancel button remains disabled. If I try to click on some other control in the page I get the "in_progress" error, and later I get the timeout error.
I thought it could be depending on the file size, but sometimes, with the same file, the upload is successful, so I think I could exclude some request-size problem. But! This problem doesn't happen in my development environment (my localhost), it happens only when I try to upload a file in a different machine then mine, so when there's a http comunication.
An oddity I've just noticed: during this strange behavior, the cancel button is disabled except for some milliseconds every random seconds. In other words: button disabled, ten seconds pass, button enabled for an istant and then button disabled, 15 seconds pass and button enabled again for an istant, and so on until the timeout. It smells to me like an hunged connection.
Any suggestions?
Thank you,
Daniele
This is the relevant part of my code (the destination directories are set):
Code: HTML/ASPX
<script type="text/javascript">
function error_handler(control, error, message) {
if (error == "extension_not_allowed")
alert('blahblahblah');
else
alert('blahblahblah');
}
</script>
<eo:AJAXUploader ID="UploaderRic" runat="server" BrowseButtonText="Sfoglia..."
CancelButtonText="Cancella" UploadButtonText="Carica" width="400"
AllowedExtension="pdf" ClientSideOnError="error_handler"
ProgressTextFormat="Caricamento in corso - {percentage}%"
AutoPostBack="true" PostedFileLabelFormat="{posted_file_name}"
MaxFileCount="1">
<LayoutTemplate>
<table>
<tr>
<td style="text-align:left" >
<asp:PlaceHolder ID="InputPlaceHolder" runat="server">Input Box Place Holder</asp:PlaceHolder>
</td>
<td style="text-align:right">
<asp:Button ID="UploadButton" runat="server" Text="Carica" />
</td>
</tr>
<tr>
</tr>
<tr>
<td style="text-align:left">
<eo:ProgressBar ID="ProgressBar" runat="server" Width="330" ControlSkinID="Windows_XP" />
</td>
<td style="text-align:right">
<asp:Button ID="CancelButton" runat="server" Text="Annulla" />
</td>
</tr>
<tr>
<td>
<asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server">Progress Text Place Holder</asp:PlaceHolder>
</td>
</tr>
<tr>
<td style="padding-right: 5px; text-align:left;">
<asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server">Posted Files</asp:PlaceHolder>
</td>
<td style="text-align:'right'">
<asp:Button ID="DeleteButton" runat="server" Text="Elimina" />
</td>
</tr>
</table>
</LayoutTemplate>
</eo:AJAXUploader>