diff --git a/src/routes.rs b/src/routes.rs index 3d5812e..f9735f8 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -3,7 +3,7 @@ use crate::database::entry::{Entry, InEntry}; use crate::database::hierarchies::{list_roots, resolve_path, UHierPath}; use crate::database::lang::Query; use crate::database::UpEndDatabase; -use crate::filesystem::add_path; +use crate::filesystem::add_file; use crate::previews::PreviewStore; use crate::util::hash::{decode, encode, Hashable}; use crate::util::jobs::JobContainer; @@ -235,7 +235,11 @@ pub async fn put_object( .await?; let connection = state.upend.connection().map_err(ErrorInternalServerError)?; - add_path(&connection, &final_path, hash).map_err(ErrorInternalServerError)?; + add_file(&connection, &final_path, hash).map_err(ErrorInternalServerError)?; + + if let Some(filename) = filename { + let _ = upend_insert_val!(&connection, address, "LBL", filename); + } Ok((address, None)) } else {