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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:29:46+00:00 2026-06-06T10:29:46+00:00

I know that conventionally for an app to interact with the internet, it must

  • 0

I know that conventionally for an app to interact with the internet, it must use a web service to exchange information. However, how would one upload data(photos, text, audio recordings etc.etc.) from app to server(which holds data for all user accounts)? I know some people use an email-to-server tactic from research but even then it sounds ineffective and slow. How do apps such as Instagram upload so fast? I am trying to replicate that sort of uploading. Please guide me in the right direction.

Thanks for the help!

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

    You should definitely look into AFNetworking. Here is an example of my uploading an image to a php web service:

    NSData *imageData = UIImagePNGRepresentation(pageImage);
    
    AFHTTPClient *client= [AFHTTPClient clientWithBaseURL:[NSURL URLWithString:@"http://www.SERVER.com"]];
    
    
    //You can add POST parameteres here
    NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
                            author, @"author",
                            title, @"title",
                            nil];
    
    NSMutableURLRequest *request = [client multipartFormRequestWithMethod:@"POST" path:@"/PATH/TO/WEBSERVICE.php" parameters:params constructingBodyWithBlock: ^(id <AFMultipartFormData>formData) {
    
    //This is the image
        [formData appendPartWithFileData: imageData name:@"cover_image" fileName:@"temp.png" mimeType:@"image/png"];
    
    
    }];
    
    
    
    AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
    
    //Setup Upload block to return progress of file upload
    [operation setUploadProgressBlock:^(NSInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
        float progress = totalBytesWritten / (float)totalBytesExpectedToWrite;
        NSLog(@"Upload Percentage: %f %%", progress*100);
    }];
    
    
    
    
    //Setup Completeion block to return successful or failure
    [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSString *response = [operation responseString];
        NSLog(@"response: [%@]",response);
        //Code to run after webservice returns success response code
    
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"error: %@", [operation error]);
        //Code to Run if Failed
    
    }];
    
    [operation start];
    

    Edit- Also I use MBProgressHUD to display to the user the uploading on longer uploads.

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

Sidebar

Related Questions

I know that one of the differences between classes and structs is that struct
We know that behind the scenes, the ASP.NET MVC framework will use reflection to
I know that one can define an 'expected' exception in JUnit, doing: @Test(expect=MyException.class) public
I am developing a web app but is not satisfied with is architecture that
I am an autodidact so dont know much about conventional web development however, I
I'm trying to develop an app that would normally be considered to be malware,
I know that it's a subject that can raise a lot of debate, but
I know that exceptions have a performance penalty, and that it's generally more efficient
I know that I should put all the html elements in body tag, but
I know that it's possible to implicitly provide asynchronous interaction using: Asynchronous Delegates Asynchronous

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.