如何更改R2桶文件的Content Disposition?

What is the name of the domain?

dash.cloudflare.com

What is the issue you’re encountering

我太难了,先是discourse论坛上一个包含图片的帖子编辑一下之后显示broke,虽然图片右击还能打开,在编辑页面预览也是正常,就是发出来显示不了了。于是我migrate_to_s3把本地文件都上传到了R2,然后发现图片显示正常了,但是右击打开变成了自动下载,最后发现是Content Disposition的问题,虽然不知道discourse是怎么导致这个bug的,但是现在的情况是,我要修改已经上传到R2的文件的Content Disposition,然后大概能解决这个问题

From my understanding, it might be giving a worth of try to modify the example code for Images to make it work with your R2 Bucket :thinking:

I’m not sure if R2 works well with Cloudflare Worker, but if I understand it correctly, I currently only need to modify Content Disposition for a few files. If this can be resolved, it will save me from needing the Worker, and I can conserve a lot of effort and resources for future management. If there are no other solutions, I might ultimately use the approach you recommended.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.