This commit is contained in:
yumoqing 2025-09-23 10:38:22 +08:00
parent d69ca92aba
commit 3a4ef54399

View File

@ -202,7 +202,7 @@ async def downloadfile(url, headers=None, params=None, data={}):
async def base642file(b64str): async def base642file(b64str):
filename = getFilenameFromBase64(b64str) filename = getFilenameFromBase64(b64str)
if ',' in b64str: if ',' in b64str:
header, b64str = b64str.split(',', 1) header, b64str = b64str.split(',', 1)
fs = FileStorage() fs = FileStorage()
fpath = fs._name2path(filename, userid='tmp') fpath = fs._name2path(filename, userid='tmp')
async with aiofiles.open(fpath, 'wb') as f: async with aiofiles.open(fpath, 'wb') as f: