1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    1
    Vote Rating
    0
    edorado is on a distinguished road

      0  

    Default Problem uploading multiple files

    Problem uploading multiple files


    greetings:

    I have the following problem with ext-4 application, I upload multiple images to the server, to create a function that pressing a button that creates a new named FileField photo [] to take them to the server as an array of images . The problem is that when sending data to the server only sends FileField last image that was added to the zero position of the array. It's like missing a setting that would allow me to upload multiple files to the server, or that the last element is inserted FileField which recognizes the form.

    if anyone could help me I would appreciate, I'm engaged for more than three days. Sorry de translation.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,710
    Vote Rating
    436
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    This code seems to be working to me:

    Code:
    new Ext.form.Panel({
        renderTo : document.body,
        items    : [
            {
                xtype : 'filefield',
                name  : 'file1'
            },
            {
                xtype : 'filefield',
                name  : 'file2'
            },
            {
                xtype   : 'button',
                text    : 'Submit',
                handler : function(btn) {
                    var form = btn.up('form');
    
                    form.submit({
                        url : 'data/form.php'
                    });
                }
            }
        ]
    });
    Screen Shot 2012-11-23 at 9.37.53 AM.png
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.