Passing file content from Extjs to php -


i looking way pass content extjs php processing it's not working. i've tried far:

ext.onready(function(){         ext.create('ext.form.panel', {             title: 'upload pdf file',             width: 400,             bodypadding: 10,             frame: true,             renderto: 'uploadform2',             items: [                 {                     xtype: 'filefield',                     name: 'file',                     fieldlabel: 'pdf file',                     labelwidth: 50,                     msgtarget: 'side',                     allowblank: false,                     anchor: '100%',                     buttontext: 'select file...',                     id: 'file'                 },                 {                     xtype: 'button',                     text: 'upload',                     handler: function(){                         var file = ext.getcmp('file').getel().down('input[type=file]').dom.files[0];                         var form = this.up('form');                         form.savefile(file);                     }                 }             ],          savefile: function(file){             var newfile = file; // file how can send codeigniter?             console.log(newfile);         }     }) }); 

you should better off form.submit. not sure ext version using it's same.

form.submit({     url:'url upload',     method: 'post',     success: function(fp, o){         // logic after successful upload     },     failure: function(fp, o){         // handle failures     } }); 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -