Results 1 to 2 of 2

Thread: uploading promblem

  1. #1
    Ext User
    Join Date
    Jul 2009
    Location
    Chennai
    Posts
    7

    Arrow uploading promblem

    This was my upload code, in Extjs form also i m using Mysql database. Here the full path is needed for Mysql query, because i am using "load data local infile" query.
    My trouble was i can't get fullpath of file which i upload,because path was filter by browser.On function part i got only filename,nor path. So please help me.it was very helpful to me...
    Code:
    {
                xtype: 'fileuploadfield',
                id: 'form_file',
                name:'form_file',
                emptyText: 'Select an file',
                fieldLabel: 'Upload File',
                    labelSeparator:'',
                name: 'Fileconten',
                buttonCfg: {
                text: '',
                iconCls: 'upload-icon'
                }}
    // function
     function uploading(){
             
          var form_file=document.getElementById("form_file").value;
          fp.getForm().submit({
                            method:'POST',
    	                   url: '../crm/uploadtodatabase.jsp?form_file ='+ form_file,
    
    	                    success: function(){
    	                        Ext.Msg.alert('Information', 'Sucessfully Added');
                                 fp.reload();
                                 fp.getForm().reset();
    	                    },
    						failure: function(){
    							  Ext.Msg.alert('Warning','no.');
    							}
    	                })
    
         }
    
    // this was my Query which i am using in jsp
    
    String csvcndtn = "";
     csvcndtn="LOAD DATA local INFILE '"+ form_file  +"' INTO TABLE tbl_market_db FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\r\\n' ignore 1 lines(name,mobileno,company_name,location)" ;

  2. #2

    Default

    {
    xtype: 'fileuploadfield',
    id: 'form_file',
    name:'form_file',
    emptyText: 'Select an file',
    fieldLabel: 'Upload File',
    labelSeparator:'',
    name: 'Fileconten',
    buttonCfg: {
    text: '',
    iconCls: 'upload-icon'
    }}

    you have 2 name attribute

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •