返回提交历史
Modified
g4f/image/copy_images.py
+1
-1
XFEstudio/gpt4free
Fix image links
3066a603
代码差异
1 个文件
+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}")