提交 dd23b5e6 编写于 作者: D Dakong 提交者: Chyroc

Update messages.py (#724)

Add timeout for upload file function to fix large file send error
上级 1306749c
......@@ -364,7 +364,7 @@ def upload_chunk_file(core, fileDir, fileSymbol, fileSize,
else:
files['chunk'], files['chunks'] = (None, str(chunk)), (None, str(chunks))
headers = { 'User-Agent' : config.USER_AGENT }
return core.s.post(url, files=files, headers=headers)
return core.s.post(url, files=files, headers=headers, timeout=config.TIMEOUT)
def send_file(self, fileDir, toUserName=None, mediaId=None, file_=None):
logger.debug('Request to send a file(mediaId: %s) to %s: %s' % (
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册