From 3cc0dcff45d0d07d0eae47f62589cebcf7aef139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 23 Jan 2022 14:55:49 +0100 Subject: [PATCH] also LBL uploaded file --- src/routes.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 {