Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6162887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:43:57+00:00 2026-05-23T21:43:57+00:00

I am using extjs2.0.1. I am using filefield plugin for file uplaod functionality. For

  • 0

I am using extjs2.0.1. I am using filefield plugin for file uplaod functionality. For Upload button I want the content-Type to be set as ‘multipart/form-data’. Right now in fiddler I can see content type set to Content-Type: application/x-www-form-urlencoded.
How can I achieve this?

My code is as follows:

Ext.onReady(function() {
Ext.QuickTips.init();
    var uploadFile={
        xtype : 'fieldset',
        title : 'Search',
        autoHeight : true,
        items : [{
                    xtype : 'fileuploadfield',
                    emptyText : 'select file',
                    fieldLabel : 'file',
                    id : 'file-path',
                    buttonCfg : {
                        text :  'browse'
                    }
                }],
        buttons : [{
                    text : 'upload',
                    handler : function() {
                        Path = fp.form.findField('file-path').getValue();
                        var box = Ext.MessageBox.wait('uploading file ','please_wait');

                        if (fp.getForm().isValid()) {
                            Ext.Ajax.request({
                                url : 'uploadFile.jsp',
                                params:'file-path='+Path,
                                method : 'POST',
                                waitMsg : 'Uploading your file...',
                                success : function(response) {
                                    box.hide();
                                    Ext.Msg.alert("Success","Upload Successfull!");

                                },
                                failure : function() {
                                    box.hide();
                                    Ext.Msg.alert("Failure","Upload Failed!");
                                }
                            });
                        }
                    }

                }]


};
var fp = new Ext.FormPanel({
            autoHeight : true,
            bodyPadding: 10,
            margin : '0 0 20',
            frame : 'true',
            renderTo : 'addvoiceline',
            items : [
                       uploadFile
                    ]        
        });

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:43:58+00:00Added an answer on May 23, 2026 at 9:43 pm

    In extjs3 I would do it by setting fileUpload to true in form config. Maybe this would work in extjs2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ExtJS 3.2 and have content inside of a tab panel, and the
I want to know if we can create reports using EXTJS. Thnx a lot
I'm using ExtJS to make a form that generates a report from the data
I am using Extjs 4 to create a line chart. Now I want to
I'm using ExtJS 3 and when I want to select a date for the
I am using ExtJS and I have a htmleditor in my form. I would
I am using ExtJS with an XMLReader to display content in a GridPanel. This
I'm new in using Extjs Library , I want to use GridPanel but I
I am building an application in JavaScript using ExtJS. As I add more functionality
I have implemented a gridpanel using Extjs that shows the content of a database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.