3D优化
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user