api: start refactor of signature to calculate checksums earlier

This commit is contained in:
Alex Auvolat
2025-02-17 18:47:06 +01:00
parent a04d6cd5b8
commit c5df820e2c
21 changed files with 288 additions and 231 deletions
+3 -1
View File
@@ -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,