From 331826b003fae451c70e17807d1a105af1453413 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sun, 11 Feb 2024 06:59:53 +0100 Subject: Add upload image in You provider --- g4f/gui/server/backend.py | 1 + 1 file changed, 1 insertion(+) (limited to 'g4f/gui/server/backend.py') diff --git a/g4f/gui/server/backend.py b/g4f/gui/server/backend.py index 14f6cece..6847be34 100644 --- a/g4f/gui/server/backend.py +++ b/g4f/gui/server/backend.py @@ -138,6 +138,7 @@ class Backend_Api: file = request.files['image'] if file.filename != '' and is_allowed_extension(file.filename): kwargs['image'] = to_image(file.stream, file.filename.endswith('.svg')) + kwargs['image_name'] = file.filename if "json" in request.form: json_data = json.loads(request.form['json']) else: -- cgit v1.2.3