[FIXED] [2.4] MultiUpload selection limit error

Page 2 of 2 FirstFirst 12
  1. #11
    Oka, the example is simple, you need to select many files to see the error.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ExtMultiupload.WebForm1" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Default" />
        <form id="form1" runat="server">
        <ext:MultiUpload ID="MultiUpload1" runat="server" OnFileUpload="MultiUpload1_FileUpload" AutoStartUpload="true" FileDropAnywhere="false" FileSizeLimit="2 MB" FileTypes="*.png;*.jpg;*.jpeg;*.gif" FileTypesDescription="Archivos de imagen" FileUploadLimit="3" FileQueueLimit="0">
            <Button>
                <ext:LinkButton ID="asdd" runat="server" Text="Agregar foto" Icon="Add" />
            </Button>
            <Listeners>
                <UploadStart Handler="Ext.Msg.wait('Subiendo archivo '+ file.name +', por favor espere...');" />
                <UploadError Fn="uploadError" />
                <FileSelectionError Fn="fileSelectionError" />
                <UploadComplete Handler="Ext.Msg.hide();" />
            </Listeners>
        </ext:MultiUpload>
        </form>
        <script type="text/javascript">
            function uploadError(item, file, errorCode, message) {
                alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
            }
    
            function fileSelectionError(item, file, errorCode, message) {
                alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
            }
        </script>
    </body>
    </html>

     protected void MultiUpload1_FileUpload(object sender, FileUploadEventArgs e)
            {
                if (null != e && e.HasFile)
                {
    
                }
            }
  2. #12
    Thank you! We are investigating this issue!
  3. #13
    Hi everybody,

    It turns out that FileUploadLimit="3" means that 2 files can be uploaded. It looks a bug/inconsistency in the Flash part of the MultiUpload.

    For now, please set up FileUploadLimit="4" and use this override to avoid a JavaScript error:
    Ext.net.MultiUpload.override({
        swfUploadUploadError : function (file, errorCode, message) {
            if (errorCode == -290){
                return true;
            }
    
            if (file) {
                this.swfUploadQueue[file.id].status = "error";
            }
            
            return this.fireEvent("uploaderror", this, file ? this.swfUploadQueue[file.id] : null, errorCode, message);
        }
    });
    Also you will have to check the "file" argument on null before using it in an UploadError handler.
  4. #14
    Both the issues have been fixed in the SVN trunk.

    Thank you for the report.
Page 2 of 2 FirstFirst 12

Similar Threads

  1. MultiUpload how to access to PostParams
    By xtremexploit in forum 2.x Help
    Replies: 2
    Last Post: Oct 31, 2013, 9:09 PM
  2. Simple MultiUpload not working on IE9 (Windows 7)
    By xtremexploit in forum 2.x Help
    Replies: 1
    Last Post: Oct 28, 2013, 9:02 AM
  3. Replies: 5
    Last Post: Oct 07, 2013, 2:44 PM
  4. [CLOSED] Limit x y drag on Ext.NET 2.x
    By xeo4.it in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: May 15, 2013, 4:00 PM
  5. Limit a Dataview
    By walle in forum 1.x Help
    Replies: 5
    Last Post: Jul 06, 2010, 6:04 PM

Posting Permissions