mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-10-26 01:54:36 +08:00
_download_file did a bare requests.get and wrote resp.content, so the whole body was buffered before anything could object -- a socket timeout alone never fires on a server that keeps trickling bytes, and the vendor decides the size of the file it signs a link for. Route it through common.media_download, the helper the LinkAI voice download in voice/linkai already uses: the body is streamed, counted chunk by chunk and cut off at the shared cap, and a refused download leaves no partial file behind.