refac: images

This commit is contained in:
Timothy Jaeryang Baek
2025-11-04 13:30:59 -05:00
parent 939521b75d
commit 8e5690aab4
8 changed files with 279 additions and 476 deletions

View File

@@ -1,5 +1,5 @@
from open_webui.routers.images import (
load_b64_image_data,
get_image_data,
upload_image,
)
@@ -22,7 +22,7 @@ def get_image_url_from_base64(request, base64_image_string, metadata, user):
if "data:image/png;base64" in base64_image_string:
image_url = ""
# Extract base64 image data from the line
image_data, content_type = load_b64_image_data(base64_image_string)
image_data, content_type = get_image_data(base64_image_string)
if image_data is not None:
image_url = upload_image(
request,