Description
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
botbuilder==0.0.1
botbuilder-core==4.16.1
botbuilder-dialogs==4.16.1
botbuilder-integration-aiohttp==4.16.1
Describe the bug
Getting the File size exceed error on pdf file upload using.
Expected behavior
Max file size limit is 2MB. The file I am trying to upload is 214KB. So, it should upload without error.
Using the following approach:
conversation_id = turn_context.activity.conversation.id
response = await connector.conversations.upload_attachment(
conversation_id,
AttachmentData(
name=os.path.basename(file_path),
original_base64=file_content,
type="application/pdf",
),
)
trace back
Traceback (most recent call last):
File "D:\WorkSpace-PyCharm\Python Bot\env\lib\site-packages\botbuilder\core\bot_adapter.py", line 174, in run_pipeline
return await self._middleware.receive_activity_with_status(
File "D:\WorkSpace-PyCharm\Python Bot\env\lib\site-packages\botbuilder\core\middleware_set.py", line 69, in receive_activity_with_status
return await self.receive_activity_internal(context, callback)
File "D:\WorkSpace-PyCharm\Python Bot\env\lib\site-packages\botbuilder\core\middleware_set.py", line 79, in receive_activity_internal
return await callback(context)
File "D:\WorkSpace-PyCharm\cpaclientonboardingbot\bots\dialog_bot.py", line 38, in on_turn
await super().on_turn(turn_context)
File "D:\WorkSpace-PyCharm\Python Bot\env\lib\site-packages\botbuilder\core\activity_handler.py", line 70, in on_turn
await self.on_message_activity(turn_context)
File "D:\WorkSpace-PyCharm\cpaclientonboardingbot\bots\dialog_bot.py", line 53, in on_message_activity
await run_main_conversation_flow(turn_context,self.obj_FlowAccesor,self.obj_PopulateDataModels)
File "D:\WorkSpace-PyCharm\cpaclientonboardingbot\conversationalflow\create_conversational_flow.py", line 398, in run_main_conversation_flow
response = await connector.conversations.upload_attachment(
File "D:\WorkSpace-PyCharm\Python Bot\env\lib\site-packages\botframework\connector\aio\operations_async_conversations_operations_async.py", line 1133, in upload_attachment
raise models.ErrorResponseException(self._deserialize, response)
botbuilder.schema._models_py3.ErrorResponseException: (MessageSizeTooBig) The request content length exceeded limit of 262144 bytes.