add download message image
continuous-integration/drone/push Build is passing

This commit is contained in:
jianxin committed 2024-01-17 17:42:30 +08:00
1 parent 4dcc52a835
commit cdfe31bafc
1 file changed
+1 -5
+1 -5
View File
@@ -21,11 +21,8 @@ def get_message_resource(client, message_id, file_key, file_type, save_dir):
.type(file_type)
.build()
)
# 发起请求
response: GetMessageResourceResponse = client.im.v1.message_resource.get(request)
# 处理失败返回
if not response.success():
lark.logger.error(
f"client.im.v1.message_resource.get failed, code: {response.code}, msg: {response.msg}, log_id: {response.get_log_id()}"
@@ -33,7 +30,6 @@ def get_message_resource(client, message_id, file_key, file_type, save_dir):
return
# 处理业务结果
# lark.logger.info(lark.JSON.marshal(response.data, indent=4))
# 处理业务结果
file_path = os.path.join(save_dir, file_key)
@@ -41,7 +37,7 @@ def get_message_resource(client, message_id, file_key, file_type, save_dir):
f.write(response.file.read())
f.close()
return response.file_name
return file_path
def upload_media(client, file_path, parent_type, parent_node):