mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
feat: use local profile image by default
This commit is contained in:
@@ -65,7 +65,7 @@ class UsersTable:
|
||||
"name": name,
|
||||
"email": email,
|
||||
"role": role,
|
||||
"profile_image_url": get_gravatar_url(email),
|
||||
"profile_image_url": "/user.png",
|
||||
"timestamp": int(time.time()),
|
||||
}
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ import os
|
||||
import aiohttp
|
||||
import json
|
||||
|
||||
from utils.misc import calculate_sha256
|
||||
from utils.misc import calculate_sha256, get_gravatar_url
|
||||
|
||||
from config import OLLAMA_API_BASE_URL, DATA_DIR, UPLOAD_DIR
|
||||
from constants import ERROR_MESSAGES
|
||||
@@ -165,3 +165,10 @@ def upload(file: UploadFile = File(...)):
|
||||
yield f"data: {json.dumps(res)}\n\n"
|
||||
|
||||
return StreamingResponse(file_process_stream(), media_type="text/event-stream")
|
||||
|
||||
|
||||
@router.get("/gravatar")
|
||||
async def get_gravatar(
|
||||
email: str,
|
||||
):
|
||||
return get_gravatar_url(email)
|
||||
|
||||
Reference in New Issue
Block a user