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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:20:53+00:00 2026-05-30T14:20:53+00:00

I’m trying to upload an image to Amazon S3 and get a link for

  • 0

I’m trying to upload an image to Amazon S3 and get a link for the file(Using ASIHTTPRequest for amazon s3). For now I have done the following(my questions are actually in code):

- (void) uploadAnImageToS3 {
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        [ASIS3Request setSharedSecretAccessKey:@"*****here I put my secretkey*****"];
        [ASIS3Request setSharedAccessKey:@"*****here I put my key*****"];
        NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(self.imageToPost)];
        NSString * key = @"aKey"
        ASIS3ObjectRequest *request = [ASIS3ObjectRequest PUTRequestForData:imageData withBucket:@"theBucketName" key:key];
        [request setShouldCompressRequestBody:YES];
        [request startSynchronous];


        if (![request error]) {
            //Here I should share a link for the put file, how do I get it? Is there any response from s3?
        }
        else {
            NSLog(@"%@",[[request error] localizedDescription]);
        }
    [self performSelectorOnMainThread:@selector(stopActivity) withObject:self waitUntilDone:YES];
    [pool release];
}

I can't figure out why respString content is not accessible

  • 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-30T14:20:55+00:00Added an answer on May 30, 2026 at 2:20 pm

    Okey, I’ve managed to do it myself 🙂
    Firstly you should set an access policy which is the property of PUT request

    requestForPUTSmth.accessPolicy = ASIS3AccessPolicyPublicReadWrite;

    The link for the file is composed in such way:

    NSString * linkString = [NSString stringWithFormat:@”http://%@.s3.amazonaws.com/%@”, bucket, key];

    Where bucket – is the name of your folder on S3 and Key is the name of file. That’s it.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am trying to render a haml file in a javascript response like so:
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in
I am using Paperclip to handle profile photo uploads in my app. They upload

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.