GLTF 文件未在 GCP/应用引擎中提供服务

问题描述 投票:0回答:1

我正在使用应用程序引擎并部署反应应用程序。我正在尝试提供 GTLF 文件,但无法找到它们。它位于公共文件夹中,我认为我正在从 yaml 文件正确指定路径。如果我错了请纠正我。

它在本地主机上完美运行

我还有什么遗漏的吗??

runtime: nodejs20
env: standard
service: default
 
handlers:
- url: /static
static_dir: build/static

- url: /(.*\.(json|ico|js))$
static_files: build/\1
upload: build/.*\.(json|ico|js)$

- url: .*
static_files: build/index.html
upload: build/index.html

- url: /scene\.gltf
static_files: /scene.gltf
upload: /scene.gltf
mime_type: model/gltf+json
 
- url: /scene\.bin
static_files: /scene.bin
upload: /scene.bin
mime_type: application/octet-stream






I tried changing mime type tried using glb file but still App engine isn't able to locate that file

reactjs google-app-engine gltf app.yaml serve
1个回答
0
投票

请确保按照此示例缩进正确。另外,请检查此 Github 链接 中的此格式是否有效。

您的代码应如下所示:

- url: /(.*\.(gltf))$
  static_files: public/\1
  upload: .*\.(gltf)$

如果我提供的建议不起作用,我建议通过此link将其归档为错误,以便Google Cloud工程师可以查看它。这没有具体的预计到达时间,但您可以在创建票证后跟踪其进度。

© www.soinside.com 2019 - 2024. All rights reserved.