aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-12-27 17:34:49 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-12-27 17:34:49 +0100
commitea4cd48bba96027882a637df08e313af92a3db46 (patch)
tree62b5d7d9bc7fd2bf3defd1a85ae1b3f34cd4b8ee
parentdea6cd00399655b6b34545d059005160902bea9e (diff)
downloadaerogramme-ea4cd48bba96027882a637df08e313af92a3db46.tar.gz
aerogramme-ea4cd48bba96027882a637df08e313af92a3db46.zip
fix metadata
-rw-r--r--src/storage/garage.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/storage/garage.rs b/src/storage/garage.rs
index 00b0214..90b84d6 100644
--- a/src/storage/garage.rs
+++ b/src/storage/garage.rs
@@ -374,8 +374,12 @@ impl IStore for GarageStore {
}
};
+ let mut bv = BlobVal::new(blob_ref.clone(), buffer);
+ if let Some(meta) = object_output.metadata {
+ bv.meta = meta;
+ }
tracing::debug!("Fetched {}/{}", self.bucket, blob_ref.0);
- Ok(BlobVal::new(blob_ref.clone(), buffer))
+ Ok(bv)
}
async fn blob_insert(&self, blob_val: BlobVal) -> Result<(), StorageError> {
let streamable_value = s3::primitives::ByteStream::from(blob_val.value);
@@ -385,6 +389,7 @@ impl IStore for GarageStore {
.put_object()
.bucket(self.bucket.to_string())
.key(blob_val.blob_ref.0.to_string())
+ .set_metadata(Some(blob_val.meta))
.body(streamable_value)
.send()
.await;