mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-20 11:21:14 +00:00
Generate details during ingest
This commit is contained in:
parent
8f62b0c325
commit
f3ef2d870b
1 changed files with 5 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue