zhangqian
2024-11-22 165d75b97916335ec7b5046f7c476e494a12df51
app/service/basic.py
@@ -44,12 +44,11 @@
        url = f"{self.base_url}/exceltalk/download/excel"
        return await self.download_from_url(url, params={'excel_name': file_id})
    async def excel_talk_upload(self, chat_id: str, filename: str, file_content: bytes):
    async def excel_talk_upload(self, chat_id: str, files):
        url = f"{self.base_url}/exceltalk/upload/files"
        params = {'chat_id': chat_id, 'is_col': '0'}
        # 创建 FormData 对象
        files = [('files', (filename, file_content, 'application/octet-stream'))]
        async with httpx.AsyncClient() as client:
            response = await client.post(