feat: 支持本地上传插件

This commit is contained in:
Soulter
2024-07-07 20:59:12 +08:00
parent 77067c545c
commit ddad30c22e
33 changed files with 113 additions and 30 deletions

View File

@@ -9,7 +9,7 @@ async def text_to_image_base(text: str, return_url: bool = False) -> str:
'''
返回图像的文件路径
'''
with open(os.path.join(TEMPLATE_PATH, "base.html"), "r") as f:
with open(os.path.join(TEMPLATE_PATH, "base.html"), "r", encoding='utf-8') as f:
tmpl_str = f.read()
assert(tmpl_str)