So, I use firebase repository to upload files to my site. Here is an example directory structure:
Project --------------------- | __index.html | __css | __style.css | __js | __mainScript.js
So, I upload these files to firebase in this structure, but I notice that the returned downloadURL is not very friendly in saving this structure.
For example, when I set the src iframe to downloadURL for index.html .. there are no style and body text files on the iframe page.
This is how downloadURL for index.html looks like:
https://firebasestorage.googleapis.com/v0/b/App_ID.appspot.com/o/index.html?alt=media&token=some_uid
This is what downloadURL style.css looks like:
https://firebasestorage.googleapis.com/v0/b/App_ID.appspot.com/o/css%2Fstyle.css?alt=media&token=some_uid , etc.
Of course, the index.html file looks for the style.css file at:
https://firebasestorage.googleapis.com/v0/b/App_ID.appspot.com/o/css/style.css
but the result is 404.
Is there any way to solve this problem?
PS, of course, I don’t want the user to change the URLs in their files ...
Do not use storage to save files on your site! Use Firebase hosting instead ... Firebase storage is intended for storing uploaded / uploaded files (images, audio, etc.).
https://firebase.google.com/docs/hosting/
Source: https://habr.com/ru/post/1677731/More articles:Error converting pandoc document with error 67 - htmlCreating overlay 3D maps on google maps - javascriptWhat is the difference between a tensor flow in a spark discharge with a distributed tensor flow of 1.0 by default? - deep-learningInstalling cache in files in Firebase storage - jsonwhy the lambda expression does not write `.class`, but the inner do class is javaPandas: how to group by character and take the average value for each n lines - pythonПоиск семени функции rand() TI-84 - algorithmThe correct approach to using MethodHandleProxies - javaAre Util features supported? * JavaCard side channel? - javacardJet Project Analysis Using SonarQube? - androidAll Articles