appEngine靜態文件mime type override
,靜態文件處理程序有時可以覆蓋正確的mime類型,在錯誤消息中導致錯誤消息:“無法猜測mimeType for for file for file for [File]。 application/application/octet-stream ...“ 使用“ mime_type”,而不是“ http_headers”
:在您的app.yaml配置文件中,更改“ http_headers”指令“ http_headers”的“ mime_type”,以解決問題。例如,為.otf文件指定MIME類型:- url:/home/font/(.* \ .otf) static_files:home/font/\ 1 上傳:主/字體/(。*\。otf) mime_type:application/x-font-otf
example app.yaml configuration 以下app.yaml configuration演示了“ mime_type”的正確使用 版本:0 運行時:去 ... 處理者: - url:/home/font/(.* \ .otf) static_files:home/font/\ 1 上傳:主/字體/(。*\。otf) mime_type:application/x-font-otf ... 附加資源[&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& appengine documentation:https://develovelers.google.com/appengine/docs/docs/python/python/python/python/config-conconfig/appconf.python_app-pypython_app-pypython_app_yaml_yaml_yaml_yaml_static_yaml_sstatic_ymlel_handerasustr [
免責聲明: 提供的所有資源部分來自互聯網,如果有侵犯您的版權或其他權益,請說明詳細緣由並提供版權或權益證明然後發到郵箱:[email protected] 我們會在第一時間內為您處理。
Copyright© 2022 湘ICP备2022001581号-3