mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: splash screen
This commit is contained in:
@@ -484,6 +484,19 @@ if CUSTOM_NAME:
|
||||
r.raw.decode_content = True
|
||||
shutil.copyfileobj(r.raw, f)
|
||||
|
||||
if "splash" in data:
|
||||
url = (
|
||||
f"https://api.openwebui.com{data['splash']}"
|
||||
if data["splash"][0] == "/"
|
||||
else data["splash"]
|
||||
)
|
||||
|
||||
r = requests.get(url, stream=True)
|
||||
if r.status_code == 200:
|
||||
with open(f"{STATIC_DIR}/splash.png", "wb") as f:
|
||||
r.raw.decode_content = True
|
||||
shutil.copyfileobj(r.raw, f)
|
||||
|
||||
WEBUI_NAME = data["name"]
|
||||
except Exception as e:
|
||||
log.exception(e)
|
||||
|
||||
BIN
backend/static/splash.png
Normal file
BIN
backend/static/splash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
Reference in New Issue
Block a user