所以我正在使用 Firebase 存储来上传我的网站文件。这是目录结构的示例:
Project
├── index.html
├── css
│ └── style.css
└── js
└── mainScript.js
所以我以这种结构将这些文件上传到firebase,但我注意到返回的downloadURL在保留这种结构方面不是很友好..
例如,当我将 iframe 的 src 设置为 index.html 的 downloadURL 时,iframe 页面缺少样式和 mainScript 文件。
这是 downloadURL 查找 index.html 的方式:
https://firebasestorage.googleapis.com/v0/b/App_ID.appspot.com/o/index.html?alt=media&token=some_uid
这是 downloadURL 查找 style.css 的方式:
当然 index.html 文件正在寻找 style.css 文件:
https://firebasestorage.googleapis.com/v0/b/App_ID.appspot.com/o/css/style.css
但结果为404。
有没有办法解决这个问题?
PS,当然我不想强迫用户更改他们文件中的网址......