From f3ef2d870b38f24a02aa38f65d1b038be1d5f4e1 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 24 Sep 2023 12:58:16 -0500 Subject: [PATCH] Generate details during ingest --- src/ingest.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ingest.rs b/src/ingest.rs index 40c353d..a55e267 100644 --- a/src/ingest.rs +++ b/src/ingest.rs @@ -2,6 +2,7 @@ use std::{sync::Arc, time::Duration}; use crate::{ bytes_stream::BytesStream, + details::Details, error::{Error, UploadError}, formats::{InternalFormat, Validations}, future::WithMetrics, @@ -105,6 +106,8 @@ where .save_async_read(hasher_reader, input_type.media_type()) .await?; + let details = Details::from_store(store, &identifier, media.process_timeout).await?; + drop(permit); let mut session = Session { @@ -139,6 +142,8 @@ where save_upload(&mut session, repo, store, hash.clone(), &identifier).await?; + repo.relate_details(&identifier, &details).await?; + if let Some(alias) = declared_alias { session.add_existing_alias(hash, alias).await? } else {