Add arc thumbnail support as part of #10

This commit is contained in:
NG (Graham) committed 2025-05-24 23:56:48 -04:00
1 parent 59612e6aa3
commit 2607903f7b
13 files changed
+310 -20

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
use actix_web::{dev::ResourcePath, get, web::{Data, Path}, Responder};
use actix_web::{get, web::{Data, Path}, Responder};
#[get("/customavatar/Live/{name}")]
pub async fn get(cli: Data<crate::cli::CliArgs>, name: Path<String>) -> impl Responder {
let path = std::path::PathBuf::from(&cli.data_robocraft).join("customavatars").join(format!("{}.jpg", name.path()));
let path = std::path::PathBuf::from(&cli.data_robocraft).join("customavatars").join(format!("{}.jpg", *name));
log::debug!("RC asset at {} (exists? {})", path.display(), path.exists());
actix_files::NamedFile::open_async(path).await
}