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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:52:42+00:00 2026-06-12T05:52:42+00:00

Been trying to get this to work for a while know i have tried

  • 0

Been trying to get this to work for a while know i have tried it with data and with streaming but with no luck, I assume i do not need to create the bucket as shown in most examples as the bucket i want to upload to already exists, also it tells me the bucket i am trying to access, however when i try to upload i get this

“Error uploading image to S3: The XML you provided was not well-formed or did not validate against our published schema”

here is the code

UIImage * img = [[[[CurrentGamesInfo sharedCurrentGamesInfo]GameInCreation] GetImageToSend]_imageToSend];
    NSData *savedImageData = UIImageJPEGRepresentation(img, 0.8);
    NSString *pictureName = [[[CurrentGamesInfo sharedCurrentGamesInfo]GameInCreation] GetGameID];

    @try 
    {
        AmazonS3Client *s3 = [[[AmazonS3Client alloc] initWithAccessKey:MY_ACCESS_KEY_ID withSecretKey:MY_SECRET_KEY] autorelease];

        //[s3 createBucket:[[[S3CreateBucketRequest alloc] initWithName:MY_PICTURE_BUCKET] autorelease]];
        NSArray *bucketArray = [s3 listBuckets];
        S3Bucket *bucket = [[s3 listBuckets] objectAtIndex:0];
        NSLog(@"%@",[bucket name]);


        S3PutObjectRequest *por = [[[S3PutObjectRequest alloc] initWithKey:pictureName inBucket:MY_PICTURE_BUCKET] autorelease];
        por.contentType = @"image/jpeg";

        //por.data = savedImageData;
        //por.cannedACL   = [S3CannedACL publicRead];

        S3UploadInputStream *stream = [S3UploadInputStream inputStreamWithData:savedImageData];
        //stream.delay = 0.2; 
        //stream.packetSize = 16;
        por.contentLength = [savedImageData length];
        por.stream = stream;

        [s3 putObject:por];      
    }
    @catch (AmazonClientException *exception) 
    {
        NSLog(@"Error uploading image to S3: %@", exception.message);
    }

sooooo…what am i doing wrong?

  • 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-12T05:52:43+00:00Added an answer on June 12, 2026 at 5:52 am

    Nevermind…the variable “pictureName” was nil…I slink away in shame

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

Sidebar

Related Questions

I've been trying for a while to get this to work, but I can't
I have been trying to get this jsfiddle to work. So far without luck.
I have been trying to get this code to work for a while now
I have been trying to get this to work correctly and I think I
This is crazy, I have been trying for hours to get this to work.
I don't know what I'm doing wrong but I've been trying to get this
I know this question has been asked before but the solutions did not work
I have been trying to figure this out for a while now, but every
I know that variations on this question have been asked, but I've tried all
I know this question has been asked before, but I have tried the given

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.