1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Ludhiana, Punjab, India
    Posts
    12
    Vote Rating
    0
    surindersammy is on a distinguished road

      0  

    Default Unanswered: File field not working in Extjs 4.1 ?

    Unanswered: File field not working in Extjs 4.1 ?


    Hi,

    I have one form with filefiled xtype. But its could not working. Its have so many problems,

    When i submit form is not post correct form file field data.

    Code:
    Ext.define('Saas.view.Masters.Companies.Form.CompaniesForm', {extend : 'Ext.form.Panel',
        alias : 'widget.CompaniesForm',
        id : 'CompaniesAddForm',
        method : 'POST',
        enctype:'multipart/form-data',
        fileUpload: true,
        isUpload: true,
    
    
        initComponent: function (arguments) {
            var me = this;
            Ext.apply(me, {
            autoHeight : true,
            width : 920,
            bodyPadding : 5,
            items: [{
                xtype: 'filefield',
                name: 'logo_name',
                fieldLabel: 'Photo',
                labelWidth: 50,
                msgTarget: 'side',
                allowBlank: false,
                anchor: '100%',
                buttonText: 'Select Photo...',
                listeners : {
                    change: function(btn, name, eOpts) {
                    Ext.getCmp('companyLogo').setSrc(this.getValue()) ;
                }
            }
        },{
            xtype : 'button',
            text: 'Upload',
            handler: function() {
                var form = this.up('form').getForm();
                if(form.isValid()){
                form.submit({
                url: 'photo-upload.php',
                waitMsg: 'Uploading your photo...',
                success: function(fp, o) {
                Ext.Msg.alert('Success', 'Your photo "' + o.result.file + '" has been uploaded.');
                }
            });
        }
        }    
    }]
    });
    me.callParent(arguments);
    }
    });
    Thanks,

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    What is sent in your header?
    Do you get a response from the server? Can you provide this please.

    We will need a bit more info to help.

    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Location
    Ludhiana, Punjab, India
    Posts
    12
    Vote Rating
    0
    surindersammy is on a distinguished road

      0  

    Default


    Hi Scottmartan,

    When i post form then, show data with post request in firebug.


    Code:
    logo_name :ÿØÿà�JFIF��`�`��ÿî�Adobe�d����ÿá]Exif��MM�*����2�������b;�������vGF�������GI�����?��œ��������ê�������‡i�������}���ç2009:03:12 13:46:42�Corbis���������¿�������Ӓ‘����54��’’����54��ê���´��������2008:03:14 13:59:26�2008:03:14 13:59:26���������������)������1������9�������������H������H���ÿØÿà�JFIF������ÿÛ�C�(1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcÿÛ�C//cB8BccccccccccccccccccccccccccccccccccccccccccccccccccÿÀ��x� "�ÿÄ�����������	ÿÄ�µ���}�!1AQa"q2‘¡#B±ÁRÑð$3br‚	%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ��������	ÿÄ�µ��w�!1AQaq"2B‘¡±Á	#3RðbrÑ$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ���?�Kࢣɸ|`ԑ*[mÇ¦xÎ*Ñ)=±r|½Ù<÷)×.fY~b=qÍxvÙUË¥‹ò¤s/#‘Ðúj̼¹kHÄ1œ¿Š·¡nÙ^ö1q\sÔ`Ñ]ÚBŠ³±’<Ò¨?çõ©µE"×"¢Ó7D:”ǨëV.åIádSóÓjÛ´Êwç2lçòÜ©=H­½Þu³ Æìqõ®~,»Îp£õíWm.JËåõx«©ꊔnhږ™FÈüê;ç؀öéøÐocWòœžÀR¾&„Ž½ÿ�¨¬vz“½È¬,bf¹Ý'Þ²ú~5nëk[L™DmÎ=ºÓ,Ïî7Ž7TWrk&N7)¢îS%«ÈͲI#´S0Û¯ÔU›‰c(ÞrïQÁÀÁ¢ÒÖIbQ... 
    etc...
    I am using codeigniter Framwork in backend

    Thanks,

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi