This is what I do to upload the local file (localfilename.txt) to S3 and put the files in the โ folders โ (image / selected / s3filename.txt).
AmazonCredentials * credentials = [[AmazonCredentials alloc] initWithAccessKey:ACCESS_KEY_ID withSecretKey:SECRET_KEY]; putObjectRequest = [[[S3PutObjectRequest alloc] initWithKey:@"images/selected/s3filename.txt" inBucket:@"user"] autorelease]; [putObjectRequest setFilename:@"localfilename.txt"]; [putObjectRequest setCredentials:credentials]; [[AmazonClientManager s3] putObject:putObjectRequest];
Hope this helps. Cheers, Trond
source share