|
@@ -19,7 +19,7 @@ async def upload_image(session, url, payload, files):
|
|
|
for key, (filename, content, content_type) in files:
|
|
|
content_io = io.BytesIO(content)
|
|
|
content_io.seek(0)
|
|
|
- form_data.add_field(key, content, filename=filename, content_type=content_type)
|
|
|
+ form_data.add_field(key, content_io, filename=filename, content_type=content_type)
|
|
|
|
|
|
# 发起 POST 请求
|
|
|
async with session.post(url, data=form_data) as response:
|