From d90c4ab1982b605ec582c884b9a68e2193d4a915 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 2 Apr 2026 15:09:14 +0800 Subject: [PATCH] bugfix --- llmage/llmclient.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/llmage/llmclient.py b/llmage/llmclient.py index f031ff1..53f3c71 100644 --- a/llmage/llmclient.py +++ b/llmage/llmclient.py @@ -139,8 +139,13 @@ def b64media2url(request, mediafile): path = fs.webpath(fpath) return entire_url('/idfile?path=') + env.quote(path) except Exception as e: - exception(f'{e}\n{format_exc()}') - return ' ' + e = Exception(f'{e}\n{format_exc()}') + exception(f'{e}') + raise e + elif len(mediafile) > 8000: + e = Exception(f'mediafile is not a media file') + exception(f'{e}') + raise e if mediafile.startswith('http://') or mediafile.startswith('https://'): return mediafile url = entire_url('/idfile?path=') + env.quote(mediafile)