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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:24:46+00:00 2026-05-26T20:24:46+00:00

I am using POST as discussed here to upload an image and some parameters

  • 0

I am using POST as discussed here to upload an image and some parameters to a server. On the server side i am using a stream to accept the image data but as its my first time I seem to be doing something wrong. Can someone point me to the right direction.

EDIT: Using the same code on client side(iPhone) as described in the link above. and my server code is something like this. Using a stored procedure to insert into the DB but i am not sure if the POST even reaches the method.

public void PublishIncident(string latd,string longt,string description, string picdatetime,            Stream data)
{ 
 latd = latd.Replace("-", ".");
 longt = longt.Replace("-", ".");

 string sImageName = string.Empty;
 DatabaseHelper dalInstance = new DatabaseHelper(sConnStr);
 try
 {
  dalInstance.AddParameter("pDescription", description);
  dalInstance.AddParameter("oImageName", "", ParameterDirection.Output);
  dalInstance.ExecuteNonQuery("rt_InsertIncident", CommandType.StoredProcedure);
  sImageName = Convert.ToString(dalInstance.Command.Parameters[4].Value);

  _streamToFile(sImageName, longt, description, picdatetime, data);
 }
 catch (Exception excp)
 {
   dalInstance.Dispose();
   throw excp;

 }
 finally
 {
     dalInstance.Dispose();
 }
 }

When i run it from the iphone i get a page not found response.

  • 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-26T20:24:47+00:00Added an answer on May 26, 2026 at 8:24 pm

    I went ahead and used the ASHIT framework and the thing worked like a charm. Just download the framework and code to actually upload image and parameters is as simple as –

    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:urlURL]; // url to hit + parameters
    [request setRequestMethod:@"POST"];
    
    [request appendPostData:imageData]; // image as data
    [request startSynchronous];
    NSError *error = [request error];
    
    if (error) {
        NSLog(@"error = %@", error);                
    }
    else
    {
        // success
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using SubSonic v2.x: The first issue is the error discussed here : Server Error
I'm using the post-receive-email script included with git. (Source is here .) It works
I want to send form data using POST method to a remote URL using
I have a mixed client-side/server-side validation using jQuery validation plugin. The validation happens on
I am using .post to post my data to my controller. I would like
I am using SWF Uploader to upload files. I am using java in server
I'm using Ajax to post contents, and I'm using http.send(encodeURIComponent(params)); for encoding ... but
How to pass form data using POST method and JS submit() ? I would
Can I use the following jQuery code to perform file upload using POST method
I'm trying to upload a picture with https using post method. I already know

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.