XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Fix image links

3066a603
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -1
Modified g4f/image/copy_images.py +1 -1
@@ -178,7 +178,7 @@ async def copy_media(
178 178 pass
179 179 # Build URL with safe encoding
180 180 url_filename = quote(os.path.basename(target_path))
181 return f"/media/{url_filename}" + (('?' + add_url if isinstance(add_url, str) else '' + 'url=' + quote(image)) if add_url and not image.startswith('data:') else '')
181 return f"/media/{url_filename}" + ('?' + (add_url if isinstance(add_url, str) else '' + 'url=' + quote(image)) if add_url and not image.startswith('data:') else '')
182 182
183 183 except (ClientError, IOError, OSError, ValueError) as e:
184 184 debug.error(f"Image copying failed: {type(e).__name__}: {e}")