1. #1
    Ext User
    Join Date
    Jul 2009
    Posts
    82
    Vote Rating
    0
    andryi is on a distinguished road

      0  

    Default problem with upload a file

    problem with upload a file


    Hi all, I've got a problem, with the enctype, well, I supposed:

    here is my code
    Code:
        var top2 = new Ext.FormPanel({
            fileUpload: true,
            width: 500,
            frame: true,
            title: 'File Upload Form',
            autoHeight: true,
            bodyStyle: 'padding: 10px 10px 0 10px;',
            labelWidth: 50,
            defaults: {
                anchor: '95%',
                allowBlank: false,
                msgTarget: 'side'
            },
            items: [{
                xtype: 'textfield',
                fieldLabel: 'Name'
            },{
                xtype: 'fileuploadfield',
                id: 'form-file',
                emptyText: 'Select an image',
                fieldLabel: 'Photo',
                name: 'photo-path',
                buttonText: '',
                buttonCfg: {
                    iconCls: 'upload-icon'
                }
            }],
            buttons: [{
                text: 'Save',
                handler: function(){
                    if(top2.getForm().isValid()){
                        top2.getForm().submit({
                            url:'JSP/upload.jsp',
                            method: 'POST',
                            enctype: 'multipart/form-data',
                            waitMsg: 'Uploading your video...',
                            success: function(top2, o){
                                alert("you did it");
                            },
                            failure: function(top2,o){
                                msg('Error','wrong);
                            }
                        });
                    }
                }
            },{
                text: 'Reset',
                handler: function(){
                    top2.getForm().reset();
                }
            }]
        });
    
        top2.render(document.body);
    So when I run the app, the alert appear, but when I check my disk, nothing happened, not save the file

  2. #2
    Sencha User
    Join Date
    Apr 2008
    Location
    Hong Kong
    Posts
    171
    Vote Rating
    0
    jarlau is on a distinguished road

      0  

  3. #3
    Ext User
    Join Date
    Jul 2009
    Posts
    82
    Vote Rating
    0
    andryi is on a distinguished road

      0  

    Default


    well I changed a little my code, but still not works

    Code:
    buttons: [{
                text: 'Save',
                handler: function(){
                    if(top2.getForm().isValid()){
                        top2.getForm().submit({
                            autoCreate: {
                                tag: 'form',
                                action: 'JSP/upload2.jsp',
                                method: 'POST',
                                enctype: 'multipart/form-data',
                                name: 'upload-form'
                            }
                        })
                     }
                }
     }]

  4. #4
    Sencha User
    Join Date
    Apr 2008
    Location
    Hong Kong
    Posts
    171
    Vote Rating
    0
    jarlau is on a distinguished road

      0  

    Default


    try
    Code:
                        top2.getForm().submit({
                            url:'JSP/upload.jsp',
                            method: 'POST',
                            fileUpload: true,
                            waitMsg: 'Uploading your video...',
                            success: function(top2, o){
                                alert("you did it");
                            },
                            failure: function(top2,o){
                                msg('Error','wrong);
                            }
                        });

Thread Participants: 1

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