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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:54:47+00:00 2026-06-13T00:54:47+00:00

We are trying to add in functionality into our app to allow it to

  • 0

We are trying to add in functionality into our app to allow it to POST a large file approx 50kb to our web service the file itself is a HTML template, however with the code below what we are finding is that the data seems to get cut off when the web service saves it.

The web service is currently designed to check the $_POST[‘html’] variable and write it to a file.

Is there a better way to do this and does anyone have any idea why the upload is not complete?

Thanks Aaron

   NSString *myText;
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"template" ofType:@"htm"];  
    if (filePath) {  
        myText = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; 
    } 

    NSURL *URL = [NSURL URLWithString:@"http://mywebsiteurl.com/receiveData.php"];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
    request.HTTPMethod = @"POST";
    NSString *params = [NSString stringWithFormat:@"html=%@", myText];

    NSData *data = [params dataUsingEncoding:NSASCIIStringEncoding];
    [request addValue:@"8bit" forHTTPHeaderField:@"Content-Transfer-Encoding"];
    [request addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
    [request addValue:[NSString stringWithFormat:@"%i", [data length]] forHTTPHeaderField:@"Content-Length"];    
    [NSURLConnection connectionWithRequest:[request autorelease] delegate:self];
  • 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-13T00:54:48+00:00Added an answer on June 13, 2026 at 12:54 am

    I think it is because your Server set the post limit.Check the settings at your server side about the post data limit.

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

Sidebar

Related Questions

I'm currently trying to add some testing functionality into our builds, and in order
I'm trying to add some client-side list grouping functionality into my Rails app. It's
I'm trying to build JPG upload functionality into our Windows Phone app. The server-side
I am trying to add the functionality of adding jquery into an application. I
I am trying to add email functionality to my app. I can get the
I'm trying to add some functionality from a plugin I have made into a
I'm trying to figure out how to add in a remember me functionality into
I am currently trying to add functionality to our company's ASP.NET website which will
http://www.ubercart.org/docs/api/hook_add_to_cart I am trying to hook into the add cart functionality of ubercart. I
I'm trying to add similar functionality to mobile safari. That is, when a user

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.