通过CloudFront将内容上传到S3

VIC*_*GS3 4 objective-c amazon-s3 ios amazon-cloudfront

我正在开发一个需要将图像上传到S3的应用程序.现在我这样做:

S3PutObjectRequest *por = [[S3PutObjectRequest alloc] initWithKey:nameOfThePicture inBucket:nameOfTheBucket];
    por.contentType = @"image/jpg";
    por.data        = imageData;

    // Put the image data into the specified s3 bucket and object.
    S3PutObjectResponse *putObjectResponse = [self.s3 putObject:por];
    por.delegate = self;
Run Code Online (Sandbox Code Playgroud)

将图像直接上传到S3太慢了,我已经配置了CloudFront服务.现在,我想通过CloudFront将图像上传到S3中的原始存储桶.有可能吗?如果是的话,我怎么能这样做?

真的感谢,

胜利者

dus*_*uff 5

不可以.CloudFront是一种单向事件 - 您可以通过CloudFront从S3检索对象,但不能通过CloudFront将对象上传到S3.