1

我可以将文件配置为使用默认链接上传到https://s3-ap-southeast-1.amazonaws.com/mybucket/。我的代码喜欢

IAmazonS3 client;
using (client = Amazon.AWSClientFactory.CreateAmazonS3Client(S3Service.AwsAccessKey, S3Service.AwsSecretKey, RegionEndpoint.APSoutheast1))
{
    var request = new PutObjectRequest()
    {
        BucketName = S3Service.BucketName,
        CannedACL = S3CannedACL.PublicRead,
        Key = string.Format("{0}", fileName),
        InputStream = fileData
    };
    client.PutObject(request);
}

但是当我的客户给我一个 像https://custom.com/这样的Amazon S3 CloudFront 域时

我找不到将文件推送到此存储桶的解决方案。谁能给我一个关键字或解决方案来解决这个问题?

4

0 回答 0