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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:52:00+00:00 2026-06-18T22:52:00+00:00

I have server that generates parameters like AWSAccessKeyID, acl, policy, signature for uploading file

  • 0

I have server that generates parameters like AWSAccessKeyID, acl, policy, signature for uploading file to S3 using POST like here: http://doc.s3.amazonaws.com/proposals/post.html .
Now having these parameters I need to run this request on Amazon server somehow. Seems that I can’t use native AWS iOS SDK, because it’s S3 client can only be initialized with AWS key and secret, which are stored on server and not on device.

What is the best way to call this POST request with all parameters on S3 to upload file? Or maybe there are ways to use AWS SDK for that.

  • 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-18T22:52:01+00:00Added an answer on June 18, 2026 at 10:52 pm

    Ok, in case it helps someone, I managed to do it this way:

    NSDictionary* parametersDictionary = @{@"AWSAccessKeyId" : @"YOUR_KEY",
                                                      @"acl" : @"public-read", // or whatever you need
                                                      @"key" : @"filename.ext", // file name on server, without leading /
                                                   @"policy" : @"YOUR_POLICY_DOCUMENT_BASE64_ENCODED",
                                                @"signature" : @"YOUR_CALCULATED_SIGNATURE"
                                        };
    
    AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString: @"http://s3-bucket.s3.amazonaws.com"]];
    NSMutableURLRequest *request = [httpClient multipartFormRequestWithMethod:@"POST"
                                                                         path:nil
                                                                   parameters:parametersDictionary
                                                    constructingBodyWithBlock: ^(id <AFMultipartFormData>formData) {
                                                        [formData appendPartWithFileData:fileData
                                                                                    name:@"file" //N.B.! To post to S3 name should be "file", not real file name
                                                                                fileName:@"your_filename"
                                                                                mimeType:@"mime/type"];
                                                    }];
    AFHTTPRequestOperation* operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
    

    You can use any other kind of operation like AFXMLRequestOperation, if needed, because S3 returns response in XML format.

    If any parameters is missing or contains invalid data – request won’t be accepted.

    Here is a link to background info on this: Browser Uploads to S3 using HTML POST Forms

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

Sidebar

Related Questions

I have a generated xls file on my server that I would like to
In my ASP.NET MVC project I have added a parameters.xml file that looks like:
I have a server with an asp page on it that generates a report
I have a txt file that is generated on the server and contains newlines.
I have a server that is serving files to several windows clients using the
I have a JSON stream being generated by a server side C++ program that
I have a server that runs on Solaris 10, whenever I go to the
I have a server that runs different websites on different ports. All of them
I have a server that returns JSON in the following format: [{Name: Student1, Email:
I have a server that is running Ubuntu Linux Server Edition. I once had

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.