- <CuteWebUI:UploadAttachments ID="ImageUploader" runat="server" ManualStartUpload="True"
- MaxFilesLimit="4" MultipleFilesUpload="True" TempDirectory="~/Images/Temp/"
- onfileuploaded="ImageUploader_FileUploaded" InsertText="Scegli Immagini"
- ShowFileIcons="true" InsertButtonID="ChooseButton"
- ProgressCtrlID="UploadProgressBarPanel" CancelButtonID="UploadCancelButton"
- ProgressTextTemplate="Spediti %SEND% di %SIZE% - Tempo Stimato %T% Secondi"
- ProgressTextID="UploadProgressLabel"
- ProgressPicture="../../Images/Meteora/ProgressBar.png" ProgressBarStyle="Continuous"
-
- FileTooLargeMsg="MAXFILESIZE" MaxFilesLimitMsg="MAXFILELIMIT"
- FileTypeNotSupportMsg="FILETYPE" ProgressPanelWidth="600" ProgressBarHeight="20">
- <ValidateOption AllowedFileExtensions="jpg,jpeg,png,gif,bmp" MaxSizeKB="3072" />
- </CuteWebUI:UploadAttachments>
- <div id="UploadErrorDiv" style="display: none;"></div>
Hi, i can't find any solution in this forum, for my problem. I this code i have an UploadAttachments Control, and i have set the FileTooLargeMsg, MaxFilesLimitMsg and FileTypeNotSupportMsg properties. When users select more than 4 files, a classic javascript alert windows is shown with the MAXFILELIMIT message.
Is there any possibility to show themessage into the UploadErrorDiv??
I have try to handle this kind of errors with this javascript function, but nothing happens!
- function CuteWebUI_AjaxUploader_OnError(msg)
- {
- var message = msg;
- switch (msg)
- {
- case "MAXFILESIZE":
- message = "Attenzione! I file inseriti possono essere di massimo 3MB ciascuno!";
- break;
- case "FILETYPE":
- message = "Attenzione! Sono consentiti solo file jpg, png, gif, bmp!";
- break;
- case "MAXFILELIMIT":
- message = "Attenzione! Sono consentiti 4 file alla volta!";
- break;
- }
-
- $("#UploadErrorDiv").html(message);
- $("#UploadErrorDiv").attr("style", "display: block;");
- return false;
- }
Simply the
CuteWebUI_AjaxUploader_OnError() is not called! have you any suggestion on this problem?
Thank you