1. #1
    Ext User
    Join Date
    Mar 2010
    Posts
    6
    Vote Rating
    0
    mallempati is on a distinguished road

      0  

    Question File Upload problem only with IE

    File Upload problem only with IE


    I am using same below code file upload:
    working in Firefxo but not in IE. I am struck with this more than 30 hrs. Please somebody can look at this?

    Code:
     
        uploadSecuritiesPanel = new Ext.FormPanel({
            fileUpload: true,
            width: '30%',
            frame: true,
            title: 'Load Securities from file',
            height: 180,
            bodyStyle: 'padding: 10px 10px 0 10px;',
      border: false,
            labelWidth: 20,
            defaults: {
                anchor: '95%',
                allowBlank: false,
                msgTarget: 'side'
            },
            items: [{
        xtype: 'fileuploadfield',
        id: 'form-file',
        emptyText: 'Upload securities file',
        fieldLabel: 'File',
        name: 'file-path',
        width: 100,
        buttonText: '',
        buttonCfg: {
         iconCls: 'upload-icon'
        }
       }
      ],
            buttons: [{
                text: 'Load securities from file',
                handler: function(){
                    if(uploadSecuritiesPanel.getForm().isValid()){
                     uploadSecuritiesPanel.getForm().submit({
                         url: 'CvgDispatcher?action=UPLOAD_SECURITIES',
                         waitMsg: 'Uploading your file...',
                         success: function(fp, o){
                             msg('Success', 'Processed file "'+o.result.result+'" on the server');
                         }
                     });
                    }
                }
            },{
                text: 'Reset',
                handler: function(){
                    uploadSecuritiesPanel.getForm().reset();
                }
            }]
        });
    servlet code:
    Code:
     
    
    int processed = 0; boolean isMultipart = ServletFileUpload.isMultipartContent(request); FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); List<FileItem> fileItemsList = upload.parseRequest(request); for (FileItem fileItem : fileItemsList) { processed++; }
    printWriter.print("{success:true, result:'"+ processed +"'}");
    In Firefox I am getting 1 as processed but in IE I am getting 0.

    Thanks.

  2. #2
    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


    have you stepped through your java? what is *not* getting st?

  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


    Btw, keep things simple, setup a generic form to do a file upload, this way you can pull Ext JS out of the equation and troubleshoot with minimal noise.

Thread Participants: 1