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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:43:38+00:00 2026-06-12T10:43:38+00:00

I am sending additional form data along with the file. Here is the form

  • 0

I am sending additional form data along with the file. Here is the form data:

         register_object['first_name']=$("#first_name").val();
         register_object['last_name']=$("#last_name").val();
         register_object['input_email']=$("#input_email").val();
         register_object['input_password']=$("#input_password").val();
         register_object['repeat_password']=$("#repeat_password").val();

And, following is the uploadify code that I use:

     $(document).ready(function(){          
         $("#image_file").uploadify({
            'method'   : 'post',
            'queueSizeLimit' : 1,
            'formData' : JSON.stringify(register_object),
            'buttonText' : 'Profile Pic',
            'auto' : false,
            'multi' : false,
            'swf' : 'js/plugins/others/uploadify.swf',
            'uploader' : 'upload.ashx',
            'fileTypeDesc': 'Image Files',
            'fileTypeExts': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
            'onUploadStart' : function(file) {
                $('#file_upload').uploadify('settings', 'formData', JSON.stringify(register_object));
                alert(JSON.stringify(register_object));
            },
            'onUploadSuccess' : function(file,data) {
                alert('The file finished processing. ' + data);
            },
            'onUploadError' : function(file, errorCode, errorMsg, errorString) {
                alert('The file ' + file.name + ' could not be uploaded: ' + errorString + ' ' + errorMsg);
            }
         });            
         $("#register").submit(function(){
            $('#input_password').val(CryptoJS.MD5($('#input_password').val()));
            $('#repeat_password').val(CryptoJS.MD5($('#repeat_password').val()));
         register_object['first_name']=$("#first_name").val();
         register_object['last_name']=$("#last_name").val();
         register_object['input_email']=$("#input_email").val();
         register_object['input_password']=$("#input_password").val();
         register_object['repeat_password']=$("#repeat_password").val();
            $("#image_file").uploadify('upload');
            return false;
        });
    });

When I access the post data on the server, I get nothing.

What am I doing wrong?

  • 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-06-12T10:43:39+00:00Added an answer on June 12, 2026 at 10:43 am

    I was able to finally get the data to the server. Firstly, I had to use $("#image_file") instead of $("#file_upload") (sorry, my mistake) in onUploadStart. And secondly, I had to write complete JSON string within onUploadStart:

    $('#image_file').uploadify("settings", "formData", {"first_name":register_object['first_name'],"last_name":register_object['last_name'],"input_email":register_object["input_email"],"input_password":register_object["input_password"],"repeat_password":register_object["repeat_password"]});
    

    The code goes like this:

         $(document).ready(function(){          
             $("#image_file").uploadify({
                'method'   : 'post',
                'queueSizeLimit' : 1,
                'formData' : JSON.stringify(register_object),
                'buttonText' : 'Profile Pic',
                'auto' : false,
                'multi' : false,
                'swf' : 'js/plugins/others/uploadify.swf',
                'uploader' : 'upload.ashx',
                'fileTypeDesc': 'Image Files',
                'fileTypeExts': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
                'onUploadStart' : function(file) {              
                    **$('#image_file').uploadify("settings", "formData", {"first_name":register_object['first_name'],"last_name":register_object['last_name'],"input_email":register_object["input_email"],"input_password":register_object["input_password"],"repeat_password":register_object["repeat_password"]});**
                    alert(JSON.stringify(register_object));
                },
                'onUploadSuccess' : function(file,data) {
                    alert('The file finished processing. ' + data);
                },
                'onUploadError' : function(file, errorCode, errorMsg, errorString) {
                    alert('The file ' + file.name + ' could not be uploaded: ' + errorString + ' ' + errorMsg);
                }
             });            
             ....
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

sending mail along with embedded image using asp.net I have already used following but
I'm experimenting with sending data from a jsp form and calling a servlet and
is there additional header which is presented by openssl before sending the message to
I sending ajax request from a jQuery file like below, which expects response in
When sending data from one iOS device to another, I receive these errors. 2012-06-21
In my application I have a simple XML formatted file containing structured data. Each
I got the following code and before sending i check the fields are populated
Is it possible to write a script to see which processes/programs are sending/receiving data
I'm using Zend_Soap_Client object for sending a soap request to another application here is
I have created a simple form which is loading a csv file with few

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.