Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have
sha256
as an attribute in our bucket entries. This could enable us to use S3'sGetObjectAttributesCommand
to get the sha256 of this. However, we can't follow same pattern asdotStorage workers
because CF Workers have an internal API for R2 that supports sha256, while S3 API is still not compatible.Moved towards trying to integrate md5, with the assumption of ETag header having md5 https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html in it and that we can use S3 Client for R2 with ✅ Content-MD5
We get md5 ETag in base16 (thanks docs for not mentioning this anywhere 😘) wrapped with quotation marks and S3 client for PutObjectCommand expects the base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864
Closes #58