putObjectOptions := s3.PutObjectInput{
putObjectOptions := s3.PutObjectInput{
Bucket: aws.String(config.All.CloudStorage.S3Bucket),
Key: aws.String(s3Key),
Body: file,
ContentType: aws.String("application/rss+xml"),
ContentLength: aws.Int64(fileInfo.Size()), // Explicit content length is crucial
CacheControl: aws.String("no-transform"), // Prevent content transformation by Cloudflare
}
No luck:
date: Fri, 02 May 2025 22:45:51 GMT
< content-type: application/rss+xml
< content-length: 3107
< accept-ranges: bytes
< content-encoding: aws-chunked
1 Reply
This solution works:
https://community.cloudflare.com/t/r2-not-removing-aws-chunked-from-content-encoding/786494/3
But it does involve reading the entire file into memory and generating the CRC32 directly. I can't imagine this behaviour by R2 is expected (aws-chunked is not a "real' content-encoding).