mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
return M_NOT_YET_UPLOADED when backing files are missing for a thumbnail
This was done for fetching original media files in
c70cfd3d25, but the change for thumbnails
was missed.
This commit is contained in:
parent
f216112455
commit
795ce42518
1 changed files with 5 additions and 8 deletions
|
|
@ -314,11 +314,7 @@ impl Service {
|
|||
self.db.search_file_metadata(mxc.clone(), width, height)?
|
||||
{
|
||||
debug!("Using saved thumbnail");
|
||||
let path = services().globals.get_media_file(&key);
|
||||
let mut file = Vec::new();
|
||||
File::open(path).await?.read_to_end(&mut file).await?;
|
||||
|
||||
return Ok(Some((meta, file.clone())));
|
||||
return Ok(self.read_content(&key).await?.map(|file| (meta, file)));
|
||||
}
|
||||
|
||||
let Some((meta, key)) =
|
||||
|
|
@ -328,9 +324,10 @@ impl Service {
|
|||
return Ok(None);
|
||||
};
|
||||
|
||||
let path = services().globals.get_media_file(&key);
|
||||
let mut file = Vec::new();
|
||||
File::open(path).await?.read_to_end(&mut file).await?;
|
||||
let Some(file) = self.read_content(&key).await? else {
|
||||
debug!("Original image not found, can't generate thumbnail");
|
||||
return Ok(None);
|
||||
};
|
||||
|
||||
debug!("Generating thumbnail");
|
||||
let thumbnail_result = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue