Hi,
Currently not.
But you can use the CuteWebUI_AjaxUploader_OnSelect event to do custom limitation.
Please check this sample :
- <%@ Page Language="C#" Title="First sample" %>
-
- <%@ Import Namespace="CuteWebUI" %>
- <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-
- <script runat="server">
- protected void Button1_Click(object sender, EventArgs e)
- {
-
- }
-
- void InsertMsg(string msg)
- {
- ListBoxEvents.Items.Insert(0, msg);
- ListBoxEvents.SelectedIndex = 0;
- }
- protected void UploadAttachments1_AttachmentAdded(object sender, AttachmentItemEventArgs args)
- {
- InsertMsg("Added.." + args.Item.FileName);
- }
- </script>
-
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- </head>
- <body>
- <form id="Form1" runat="server">
- <CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1" OnAttachmentAdded="UploadAttachments1_AttachmentAdded">
- <ItemCellStyle CssClass="Cell" />
- <TableStyle CssClass="Table" />
- </CuteWebUI:UploadAttachments>
- <br />
- <div>
- Server Trace:
- <br />
- <asp:ListBox runat="server" ID="ListBoxEvents" Width="800"></asp:ListBox>
- </div>
- </form>
-
- <script type="text/javascript">
- function CuteWebUI_AjaxUploader_OnSelect(files)
- {
- var uploader=this;
- var qcount=uploader.getqueuecount();
- var scount=files.length;
- if(qcount+scount>10)
- {
- alert("You can only upload 10 files");
- return false;//cancel it.
- }
- }
- </script>
-
- </body>
- </html>
Regards,
Terry