fix metadata
This commit is contained in:
parent
dea6cd0039
commit
ea4cd48bba
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
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> {
|
async fn blob_insert(&self, blob_val: BlobVal) -> Result<(), StorageError> {
|
||||||
let streamable_value = s3::primitives::ByteStream::from(blob_val.value);
|
let streamable_value = s3::primitives::ByteStream::from(blob_val.value);
|
||||||
|
@ -385,6 +389,7 @@ impl IStore for GarageStore {
|
||||||
.put_object()
|
.put_object()
|
||||||
.bucket(self.bucket.to_string())
|
.bucket(self.bucket.to_string())
|
||||||
.key(blob_val.blob_ref.0.to_string())
|
.key(blob_val.blob_ref.0.to_string())
|
||||||
|
.set_metadata(Some(blob_val.meta))
|
||||||
.body(streamable_value)
|
.body(streamable_value)
|
||||||
.send()
|
.send()
|
||||||
.await;
|
.await;
|
||||||
|
|
Loading…
Reference in a new issue