I’m trying to upload an object to Cloudflare R2 by using below code which uses AWS S3 SDK, but it gives me {“The remote server returned an error: (501) Not Implemented.”} exception, Error message was “STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented”. Can anyone give me a sample to upload object Cloud-flare R2 by using AWS S3 .NET SDK
var config = new AmazonS3Config
{
ServiceURL = "**************************.r2.cloudflarestorage.com",
ForcePathStyle = true
};
var s3Client = new AmazonS3Client(accesskey, secretkey, config);
var request = new PutObjectRequest
{
BucketName = bucketName,
Key = $"{file.FileName}",
FilePath = filePath,
};
var response = await s3Client.PutObjectAsync(request);