There is an issue with attaching files inside the bot for the user
code of attachment:
def create_file_attachment(self, file_path):
with open(file_path, "rb") as file_stream:
file_data = file_stream.read()
attachment = Attachment(
name=os.path.basename(file_path),
content_type="application/octet-stream",
content=file_data
)
return attachment
problem:
# the bot will send a docx file as an attachment to the user
# but the attachment can't be downloaded by the user in the emulator(download button is not available)
needs:
the attachment can be downloaded by the user in the emulator
Can you tell me which version of Emulator it is that you are using?
Also, this looks like the bot is built with botbuilder-python. Is this correct? If so, can you tell me which version of that you are using? Can you include all the relevant code for the activity being sent that included the attachment so I can try and repro this?
Hello, how are you? I am using version 4. And yes, that's correct, the bot is built using Bot Builder Python. Yes, of course, I will send you the part that includes the attachment code.
code of attachment:
def create_file_attachment(self, file_path):
with open(file_path, "rb") as file_stream:
file_data = file_stream.read()
attachment = Attachment(
name=os.path.basename(file_path),
content_type="application/octet-stream",
content=file_data
)
return attachment
@Mohammadhiasat - Thank you for your patience. I will attempt a repro with this and let you know what I find. If I have any additional questions, I will let you know.