This commit is contained in:
2026-07-27 15:17:13 +08:00
parent 8370ff9e79
commit c99b16d000
15 changed files with 1169 additions and 428 deletions
+6
View File
@@ -148,6 +148,12 @@ void Global::init_web_server() {
httplib::detail::read_file(path, content);
auto content_type = httplib::detail::find_content_type(
path, {}, "application/octet-stream");
if (path.ends_with(".glb")) {
content_type = "model/gltf-binary";
}
else if (path.ends_with(".gltf")) {
content_type = "model/gltf+json";
}
res->setContentTypeString(content_type);
res->setBody(content);
// res.set_file_content(path);