also LBL uploaded file

feat/vaults
Tomáš Mládek 2022-01-23 14:55:49 +01:00
parent c1698061d5
commit 3cc0dcff45
No known key found for this signature in database
GPG Key ID: ED21612889E75EC5
1 changed files with 6 additions and 2 deletions

View File

@ -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 {