Open drewburnett opened 4 years ago
from urllib.parse import urlencode
# Assuming you have the original URL and query parameters
original_url = "static/jet/css/icons/fonts/jet-icons.ttf"
query_params = {"param": "415d6s"}
# Encode the query parameters
encoded_params = urlencode(query_params)
# Construct the final URL with encoded query parameters
final_url = f"{original_url}?{encoded_params}"
When I use AWS s3, admin requests
static/jet/css/icons/fonts/jet-icons.ttf?415d6s
&static/jet/css/icons/fonts/jet-icons.woff?415d6
but s3 changes these file urls tostatic/jet/css/icons/fonts/jet-icons.ttf%3415d6s
andstatic/jet/css/icons/fonts/jet-icons.woff%3415d6
accordingly. Any suggestions?