aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3/post_object.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-26 15:11:11 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-27 10:15:17 +0100
commita0632a8e6db094b17fd3bba2a7b4bf4caf59abb6 (patch)
treed710c30c565e05f746cbe271a9cc04899f3ffb11 /src/api/s3/post_object.rs
parentea5533265cb87c3dff2d8e8858e9d131a79e1328 (diff)
downloadgarage-a0632a8e6db094b17fd3bba2a7b4bf4caf59abb6.tar.gz
garage-a0632a8e6db094b17fd3bba2a7b4bf4caf59abb6.zip
[sse-c] hook encryption in header handling and make stuff compile
Diffstat (limited to 'src/api/s3/post_object.rs')
-rw-r--r--src/api/s3/post_object.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/s3/post_object.rs b/src/api/s3/post_object.rs
index bca8d6c6..0b4ce6c6 100644
--- a/src/api/s3/post_object.rs
+++ b/src/api/s3/post_object.rs
@@ -18,6 +18,7 @@ use garage_model::garage::Garage;
use crate::helpers::*;
use crate::s3::api_server::ResBody;
use crate::s3::cors::*;
+use crate::s3::encryption::EncryptionParams;
use crate::s3::error::*;
use crate::s3::put::{get_headers, save_stream};
use crate::s3::xml as s3_xml;
@@ -232,10 +233,12 @@ pub async fn handle_post_object(
let headers = get_headers(&params)?;
+ // TODO: encryption
let stream = field.map(|r| r.map_err(Into::into));
let (_, md5) = save_stream(
garage,
headers,
+ EncryptionParams::Plaintext, // TODO
StreamLimiter::new(stream, conditions.content_length),
&bucket,
&key,