1. #1
    Ext User
    Join Date
    Jul 2008
    Posts
    17
    Vote Rating
    0
    LavkarSang is on a distinguished road

      0  

    Default Not uploading file - how to debug ?

    Not uploading file - how to debug ?


    This is what I am trying to do with a simple file upload. On the backend side of things it looks like the File is not being sent... as I get a empty object on the server side.

    In Firebug I do not see a POST, how do verify if things are being sent properly in addition to any bug in my code below !

    Code:
    new Ext.Button(
    {
    text: 'Import',
    renderTo: 'abc',
    buttonAlign: 'center',
    handler: function() {
    uploadWin.show();
    }
    }
    );
     
    var p = new Ext.form.FormPanel({
    method: 'POST',
    id: 'formID',
    fileUpload: true,
    isUpload: true,
    url: '<%= url_for(:action => "upload" ) %>',
    enctype : 'multipart/form-data',
    items: new Ext.form.TextField({
    name:'file',
    inputType:'file'
    })
    });
     
    var uploadWin = new Ext.Window({
    title: "Upload File",
    width: 350,
    height: 100,
    plain: true,
    modal: true,
    buttons: [{
    text: 'Upload',
    handler: function() {
    p.getForm().submit();
    method: 'POST'
    }
    }],
    items: [p]
    });

  2. #2
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

  3. #3
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    also, look at the new file upload button example.

Thread Participants: 2