You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just upgraded sql-explorer from 4.2 to 5.3 and I see that the pages like explorer/play/ have broken links to static files (styling, images, js, etc) resulting on completely broken styling.
A combination of Django + Azure Storage + SQL Explorer generates links like https://myblobname.blob.core.windows.net/static/explorermain.5.3.js instead of https://myblobname.blob.core.windows.net/static/explorer/main.5.3.js
It works properly for me on local file storage, but when I switch to my final Azure environment it's missing the trailing / after 'explorer/'.
I investigated that a bit and in file 'vite.py' on Azure VITE_OUTPUT_DIR = staticfiles_storage.url("explorer/")
returns https://myblobname.blob.core.windows.net/static/explorer so all the latter concatenations are wrong.
It might be a bug in django-storages but I did not find any bug reports related to that, so maybe it's your code being too optimistic.
The simple workaround could be just to check if the VITE_OUTPUT_DIR provided by storage has the trailing / and if not - appending it back.
The text was updated successfully, but these errors were encountered:
adam-hrb
changed the title
Static files URL missing / on Azure storage
Static files URL missing "/" on Azure storage
Jan 10, 2025
I just upgraded sql-explorer from 4.2 to 5.3 and I see that the pages like explorer/play/ have broken links to static files (styling, images, js, etc) resulting on completely broken styling.
A combination of Django + Azure Storage + SQL Explorer generates links like
https://myblobname.blob.core.windows.net/static/explorermain.5.3.js
instead ofhttps://myblobname.blob.core.windows.net/static/explorer/main.5.3.js
It works properly for me on local file storage, but when I switch to my final Azure environment it's missing the trailing / after 'explorer/'.
I investigated that a bit and in file 'vite.py' on Azure
VITE_OUTPUT_DIR = staticfiles_storage.url("explorer/")
returns
https://myblobname.blob.core.windows.net/static/explorer
so all the latter concatenations are wrong.It might be a bug in django-storages but I did not find any bug reports related to that, so maybe it's your code being too optimistic.
The simple workaround could be just to check if the VITE_OUTPUT_DIR provided by storage has the trailing / and if not - appending it back.
The text was updated successfully, but these errors were encountered: