shrine icon indicating copy to clipboard operation
shrine copied to clipboard

Expose copy_options

Open hkdahal opened this issue 1 year ago • 5 comments

Currently S3-compatible Cloudflare R2 does not support tagging_directive (https://developers.cloudflare.com/r2/api/s3/api/). This means, we cannot use shrine with tagging_directive. Thus, this Pull Request aims to expose copy_options.

By default, copy_options will have existing value: { tagging_directive: "REPLACE" }

For users like me, we can instantiate S3 store like below until Cloudflare is fully compatible (or just pass additional copy options):

Shrine::Storage::S3.new(bucket: BUCKET, copy_options: {}, **s3_options),

This will also solve: https://github.com/shrinerb/shrine/issues/662

hkdahal avatar Dec 04 '23 17:12 hkdahal

Can we get this merged into main?

dylandamsma avatar Dec 22 '23 04:12 dylandamsma

Awaiting approval from @janko. Can you please review/approve accordingly for this change? thanks

hkdahal avatar Dec 22 '23 04:12 hkdahal

@pokonski - can I get your feedback/approval on this Pull Request please? thanks

hkdahal avatar Jan 23 '24 15:01 hkdahal

@hkdahal sorry I can't give you an approval, I'm not a maintainer of Shrine, just commented a potential improvement :) I too am waiting for this fix 🤞

pokonski avatar Jan 24 '24 15:01 pokonski

pinging @janko for approval on this PR

hkdahal avatar Feb 02 '24 16:02 hkdahal

+1

thatdom avatar Apr 16 '24 13:04 thatdom

Thanks for the PR, looks good to me 👍🏻

janko avatar Apr 28 '24 17:04 janko