Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Request failed: forbidden (403) while using putObjectWithFile #102

Description

@bobongski
AFAmazonS3Manager *s3Manager = [[AFAmazonS3Manager alloc] initWithAccessKeyID:@"123" secret:@"123"];
s3Manager.requestSerializer.region = AFAmazonS3USStandardRegion;
s3Manager.requestSerializer.bucket = @"test-bucket";

// 2
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"imagetest" ofType:@"jpg"];
NSLog(@"filePath %@",filePath);
// 3
NSString *destinationPath = @"dummy.jpg";

[s3Manager putObjectWithFile:filePath destinationPath:@"destinationPath" parameters:nil progress:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {

} success:^(id responseObject) {
    //   NSURL *resultURL = [self.requestSerializer.endpointURL URLByAppendingPathComponent:destinationPath];

    NSLog(@"Upload complete : %@", responseObject);
} failure:^(NSError *error) {
    NSLog(@"Error uploading photo : %@", error);
}];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions