Closed legeneek closed 1 year ago
使用下面api上传图片 larkClient.im.image.create({ data: { image_type: 'message', image: fs.readFileSync(path) }, }) 图片大小1.5M,header信息如下: 'POST /open-apis/im/v1/images HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'content-type: multipart/form-data; boundary=--------------------------547342431807760474424597\r\n' + 'Authorization: Bearer \r\n' + 'User-Agent: oapi-node-sdk/1.0.0\r\n' + 'Host: open.feishu.cn\r\n' 同一个图片作为file上传能够成功
larkClient.im.image.create({ data: { image_type: 'message', image: fs.readFileSync(path) }, })
from io import BytesIO
使用下面api上传图片
larkClient.im.image.create({ data: { image_type: 'message', image: fs.readFileSync(path) }, })
图片大小1.5M,header信息如下: 'POST /open-apis/im/v1/images HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'content-type: multipart/form-data; boundary=--------------------------547342431807760474424597\r\n' + 'Authorization: Bearer \r\n' + 'User-Agent: oapi-node-sdk/1.0.0\r\n' + 'Host: open.feishu.cn\r\n' 同一个图片作为file上传能够成功