Add import base64

This commit is contained in:
Maruhi 2024-12-25 20:58:00 +09:00 committed by GitHub
parent 61ad962154
commit 0f808a62df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -336,6 +336,7 @@ class PromptServer():
for key, value in json_data.items():
if key == "image":
file_name = json_data.get("filename")
import base64
value = base64.b64decode(value)
import io
image = aiohttp.web.FileField(name=key, filename=file_name, file=io.BytesIO(value), content_type='image/png', headers=None)