-
Notifications
You must be signed in to change notification settings - Fork 134
MEDIA_URL bug, can't get valid img url from cgw-web service #174
Copy link
Copy link
Open
Description
I'm trying to download chain_logo and currency_logo on chain settings via cfg/admin. I have tried next configurations:
- When MEDIA_URL = "/media"
- icon saved to cfg-web container on path /app/src/media/PATH_TO_ICON
- on chain settings, it shows url for icon as https://localhost:8000/media/PATH_TO_ICON
- icon opens on path https://localhost:8000/cfg/media/PATH_TO_ICON
- ui service fails to upload icons from path https://nginx/media/PATH_TO_ICON

- From https://DOMAIN/cfg/api/v1/chains/ return url with /media/PATH_TO_ICON, I can handle correct url with nginx: rewrite ^(/(media)(/.*)?)$ /cfg$1 last;

- From https://localhost:8000/cgw/v1/chains return incorrect url
- When MEDIA_URL = "https://localhost:8000/media"
- icon saved to cfg-web container on path /app/src/media/PATH_TO_ICON
- on chain settings, it shows url for icon as https://localhost:8000/media/PATH_TO_ICON
- icon doesn't open on path https://localhost:8000/cfg/media/PATH_TO_ICON or https://localhost:8000/media/PATH_TO_ICON
- ui service fails to upload icons from path https://localhost:8000/media/PATH_TO_ICON
- From https://localhost:8000/cgw/v1/chains return url with DOMAIN
- 404 error on path https://localhost:8000/cfg/media/PATH_TO_ICON
- When MEDIA_URL = "https://localhost:8000/cfg/media"
- icon saved to cfg-web container on path /app/src/media/PATH_TO_ICON
- on chain settings, it shows url for icon as https://localhost:8000/cfg/media/PATH_TO_ICON
- icon doesn't open on path https://localhost:8000/cfg/media/PATH_TO_ICON or https://localhost:8000/media/PATH_TO_ICON
- ui service fails to upload icons from path https://localhost:8000/cfg/media/PATH_TO_ICON - 404(django)
So, the only way to download and open the icon via a direct link, when MEDIA_URL="/media/”, as described in the first configuration.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels