feat: infer mime

feat: store in tmp dir next to output dir
This commit is contained in:
2025-01-15 19:59:09 +00:00
parent 4accc35bdb
commit 5e97f4d12a
11 changed files with 327 additions and 297 deletions

View File

@ -125,10 +125,7 @@ async fn migrate_file(
let md: Option<Vec<&str>> = f.media_dimensions.as_ref().map(|s| s.split("x").collect());
let fu = FileUpload {
id: id_vec,
name: match &f.name {
Some(n) => n.to_string(),
None => "".to_string(),
},
name: f.name.clone(),
size: f.size as u64,
mime_type: f.mime_type.clone(),
created: f.uploaded,
@ -142,7 +139,6 @@ async fn migrate_file(
},
blur_hash: None,
alt: f.description.clone(),
..Default::default()
};
db.add_file(&fu, uid).await?;
Ok(())