mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-06 23:37:10 +08:00
Add import base64
This commit is contained in:
parent
61ad962154
commit
0f808a62df
@ -336,6 +336,7 @@ class PromptServer():
|
|||||||
for key, value in json_data.items():
|
for key, value in json_data.items():
|
||||||
if key == "image":
|
if key == "image":
|
||||||
file_name = json_data.get("filename")
|
file_name = json_data.get("filename")
|
||||||
|
import base64
|
||||||
value = base64.b64decode(value)
|
value = base64.b64decode(value)
|
||||||
import io
|
import io
|
||||||
image = aiohttp.web.FileField(name=key, filename=file_name, file=io.BytesIO(value), content_type='image/png', headers=None)
|
image = aiohttp.web.FileField(name=key, filename=file_name, file=io.BytesIO(value), content_type='image/png', headers=None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user