fbchat-asyncio icon indicating copy to clipboard operation
fbchat-asyncio copied to clipboard

Cannot send remote and local files

Open jvfiel opened this issue 5 years ago • 3 comments

I cannot send both remote and local files

here's my code

            await self.send_local_files(['/home/jvfiel/project/brooky-controller/images/apr_map.jpg'],
                                             message=Message(text=text, mentions=mentions),
                                             thread_id=thread_id,
                                             thread_type=thread_type)

I tried checking the package and I notice that it stocks on this part

upload_file = await self._state._upload(files, voice_clip=voice_clip)

on this function

async def _upload(self, files, voice_clip=False):
    print("uploading files....")
    # print(str(files[0])[1:10])
    print(files)
    upload_file = await self._state._upload(files, voice_clip=voice_clip)
    print(upload_file)
    return upload_file

jvfiel avatar Nov 24 '19 05:11 jvfiel

any ideas? @tulir

jvfiel avatar Nov 24 '19 05:11 jvfiel

I don't actually use those methods (I needed more control over the parameters so I used _upload and _send_files directly) so it's possible something is broken in send_local_files too. I just fixed a few bugs related to that (missing params and awaits), so maybe try again with 0.3.0rc3

tulir avatar Nov 24 '19 12:11 tulir

I still can't get _sendFiles to work with 0.3.0.

mockshox avatar Dec 13 '19 10:12 mockshox