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 4125656
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:53:54+00:00 2026-05-20T23:53:54+00:00

I have a simple ExtJs form panel which contains a fileuploadfield. When I submit

  • 0

I have a simple ExtJs form panel which contains a fileuploadfield. When I submit the form to the server all the key value form values get sent to the server but not the key value pair for the file upload field.
Does anyone know why this is? (I have attached some code snippets below)

Also how do I handle the upload on the server. i.e. I want to upload an image to the server process it and save it somewhere on the server?

public JsonResult SetEmployeeDetails(string firstname, string photopath)
    {
        GetData data = delegate
        {
            return Repo.SetEmployeeDetails(firstname, photopath);
        };
        JsonResultBase jsonResult = GetJsonResult(data);
        JsonResult json = PortalJsonResult(jsonResult, JsonRequestBehavior.AllowGet);
        return json;
    }



xtype: 'form',
title: 'Employee Setup',
items: [{
            fieldLabel: 'Firstname',
            xtype: 'textfield',
            name: 'firstname',
            maxLength: 10,
            allowBlank:false
        },
        {
            xtype: 'fileuploadfield',
            id: 'form-file',
            emptyText: 'Select an image',
            fieldLabel: 'Photo',
            name: 'photopath',
            buttonText: '',
            buttonCfg: {
                iconCls: 'upload-icon'
            }
        }],
buttons: [{
    text: 'Save',
    scope: this,
    handler: function(){
        var form = this.items.items[0].getForm();
        if(form.isValid()){
            form.submit({
                url: 'EmployeeDetails/SetEmployeeDetails',
                waitMsg: 'Saving your details...',
                success: function(fp, o){
                    msg('Success', 'Processed file on the server');
                }
            });
        }
    }
}]
  • 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-20T23:53:55+00:00Added an answer on May 20, 2026 at 11:53 pm

    You cannot get the file method parameters. So, your photopath variable will be usually null.
    To access the file uploaded, you can do the following:

    HttpPostedFileBase postedFile = Request.Files["fileinput"];
    if (postedFile != null)
    {
       //process the file content using postedFile.InputStream...
    }
    

    And in the javascript you need to add fileUpload: true, to your form config so that ExtJS knows you are uploading a file in the form.

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

Sidebar

Related Questions

I have a simple ExtJS 4 (xtype form) inside a window. It has two
I am using Ext.js 4. I have a panel which contains log messages returned
So, I've read a lot about using ExtJS's fileuploadfield to submit a form via
I have a simple ExtJS form, but I would like to add additional attributes
I have the following ExtJS Panel embedded in another Panel, which then resides in
I am having trouble with a simple table layout in ExtJs 4.0. I have
I have simple class with width and height member fields which define number of
I have simple php validation form that is halfway working. If you leave the
I'm using extjs and just trying to solve a simple problem: I have a
In ExtJS, say you have a simple editorgrid with two columns, X and Y,

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.