[CLOSED] does FileUploadField support multi file upload?

  1. #1

    [CLOSED] does FileUploadField support multi file upload?

    i am using ext.net from svn which version is 2.2.0.29692.
    dose FileUploadField support multi file upload?
    need update ext.net version ?
    Last edited by Daniil; Oct 11, 2013 at 4:26 AM. Reason: [CLOSED]
  2. #2
    Hi @hdsoso,

    No, it doesn't.

    There is a MultiUpload control in the trunk. It is based on Flash. The examples you can find in the trunk's Examples Explorer, in the MultiUpload folder.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @hdsoso,

    No, it doesn't.

    There is a MultiUpload control in the trunk. It is based on Flash. The examples you can find in the trunk's Examples Explorer, in the MultiUpload folder.
    i update the svn and can not find example code of uploading files to servers , could you please give me an example?
     <ext:FieldContainer runat="server" LabelWidth="65" Margin="4" FieldLabel="上传图片">
                                <Items>
                                    <ext:MultiUpload runat="server" ID="mu_1" OnFileUpload="MultiUpload1_FileUpload"
                                        AutoStartUpload="true"
                                        FileDropAnywhere="true"
                                        FileSizeLimit="15 MB"
                                        FileTypes="*.*"
                                        FileTypesDescription="All Files"
                                        FileUploadLimit="100"
                                        FileQueueLimit="0">
                                        <Listeners>
                                            <UploadStart Handler="Ext.Msg.wait('上传中');" />
    
                                            <UploadComplete Handler="Ext.Msg.hide();" />
                                        </Listeners>
                                    </ext:MultiUpload>
                                </Items>
                            </ext:FieldContainer>
    protected void MultiUpload1_FileUpload(object sender, FileUploadEventArgs e)
            {
    
                var fname = this.mu_1.FilePostName;
                var flength = this.mu_1.FileQueueLimit;
    
                var ran = new Random();
                string sNewName = DateTime.Now.ToString(@"yyyy-MM-dd-HH-mm-ss") + ran.Next(100, 999)
                                  + Path.GetExtension(fname);
                var y = System.DateTime.Now.Year.ToString(CultureInfo.InvariantCulture);
                var m = System.DateTime.Now.Month.ToString(CultureInfo.InvariantCulture);
                string strPath = HttpContext.Current.Server.MapPath("/Uploads/" + y + "/" + m + "/" + sNewName);
                string pathMoth = HttpContext.Current.Server.MapPath("/Uploads/" + y + "/" + m);
                string webPath = "/Uploads/" + y + "/" + m + "/" + sNewName;
                if (!Directory.Exists(pathMoth))
                {
                    Directory.CreateDirectory(pathMoth);
                }
               // this.mu_1..PostedFile.SaveAs(strPath);
               // here how to save the file to the server???
                var img = "<img src='" + webPath + "'/>";
                he_cont.SetValue(he_cont.Text + img);
    
    
            }
  4. #4
    An example is here:
    http://svn.ext.net/premium/trunk/Ext.Net.Examples/Examples/MultiUpload/Basic/Simple/Default.aspx
  5. #5
    Quote Originally Posted by Daniil View Post
    An example is here:
    http://svn.ext.net/premium/trunk/Ext.Net.Examples/Examples/MultiUpload/Basic/Simple/Default.aspx
    protected void MultiUpload1_FileUpload(object sender, FileUploadEventArgs e)
        {
            System.Threading.Thread.Sleep(3000); // for testing purposing only
            X.Msg.Notify("File is uploaded", "Name: " + e.FileName).Show();
        }
    there is no upload file code.
  6. #6
    Hello!

    Selected files are submitted one by one and each file upload calls MultiUpload1_FileUpload method. All information about currently uploading file is in FileUploadEventArgs.

    protected void MultiUpload1_FileUpload(object sender, FileUploadEventArgs e)
    {
        HttpPostedFile file = e.PostedFile;
        System.Threading.Thread.Sleep(3000); // for testing purposing only
        X.Msg.Notify("File is uploaded", "Name: " + e.FileName).Show();
    }

Similar Threads

  1. [CLOSED] group summary does not support row editing?
    By tobros in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 30, 2013, 5:03 AM
  2. Replies: 2
    Last Post: Aug 02, 2013, 2:43 AM
  3. [CLOSED] Multi-File upload and IE
    By itel in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 02, 2013, 6:17 PM
  4. [CLOSED] Multiple file support to upload in file upload control
    By legaldiscovery in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 01, 2013, 9:41 AM
  5. Replies: 0
    Last Post: Sep 15, 2012, 9:26 AM

Posting Permissions