For Workes & Pages, what is the name of the domain?
cdn-test.cargo1.cloud
What is the issue or error you’re encountering
response-content-disposition doesn’t set header in response for GetObject
What steps have you taken to resolve the issue?
A couple of month ago everything was OK, and these feature has worked well for 100%. What has been changed in R2 with S3 compatibility?
I know about these help page - S3 API compatibility | Cloudflare R2 docs, and response-content-disposition is only in PutObject and Copy. But why and how then has it worked before?
The similar issue has been solved here - Feature request: set "filename" directive of Content-Disposition header for Download Videos (Beta) but now doesnt work either.
What are the steps to reproduce the issue?
You can try here:
Screenshot of the error
I am experiencing the same thing. response-content-disposition
is not copied to the resulting response headers yielding downloads from my site to be just the integer name in the bucket.
@renan I see your name in the other threads. Could you comment on this here?
Thanks in advance.
Now that R2 has randomly lost this feature I have found a work-around involving Transforms.
Go to:
Rules → Transform Rules → Modify Response Header → Create rule
Rule name: Content-Disposition
If incoming requests match…
I picked:
Field: Hostname
Operator: Equals
Value: dl.mywebsite.com
Then…
Option: Set dynamic
Header name: Content-Disposition
Value: url_decode(http.request.uri.args["response-content-disposition"][0])
This appends the header we need back.
Did they fix it now? It works for me in a bucket that’s not proxied right now.
I cannot say, sorry. We moved for setting content-disposition during PutObject operation.