松弛API上载片段长度

2024-04-27 15:48:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我的代码片段被缩短到几百行。这是我用来上传它们的代码

 self.client.api_call(
     'files.upload',
     channels=channel_id,
     content=msg,
     as_user='true:',
     filetype=filetype,
     filename=filename
 )

我还需要设置什么其他参数来允许发布整个代码段?在


Tags: 代码selfclientapiidaschannelmsg
1条回答
网友
1楼 · 发布于 2024-04-27 15:48:55

没有。这个限制是由files.upload方法的Slack API强加的。在

引用documentation

There is a 1 megabyte file size limit for files uploaded as snippets.

相关问题 更多 >