aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3/put.rs
diff options
context:
space:
mode:
authorAlex Auvolat <lx@deuxfleurs.fr>2025-02-17 18:47:06 +0100
committerAlex Auvolat <lx@deuxfleurs.fr>2025-02-17 18:47:06 +0100
commitc5df820e2c2b4bff5e239b8e99f07178b98b3f5a (patch)
tree26fa3dd297ee1c8bb55f5f7573a5c3396b030507 /src/api/s3/put.rs
parenta04d6cd5b8a3acffb8daeee00aed744fb1a78ea3 (diff)
downloadgarage-c5df820e2c2b4bff5e239b8e99f07178b98b3f5a.tar.gz
garage-c5df820e2c2b4bff5e239b8e99f07178b98b3f5a.zip
api: start refactor of signature to calculate checksums earlier
Diffstat (limited to 'src/api/s3/put.rs')
-rw-r--r--src/api/s3/put.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/s3/put.rs b/src/api/s3/put.rs
index 834be6f1..551c3b76 100644
--- a/src/api/s3/put.rs
+++ b/src/api/s3/put.rs
@@ -79,7 +79,9 @@ pub async fn handle_put(
// Determine whether object should be encrypted, and if so the key
let encryption = EncryptionParams::new_from_headers(&ctx.garage, req.headers())?;
- let stream = body_stream(req.into_body());
+ let (stream, checksums) = req.into_body().streaming_with_checksums(true);
+ let stream = stream.map_err(Error::from);
+ // TODO checksums
let res = save_stream(
&ctx,