BotBuilder-Samples icon indicating copy to clipboard operation
BotBuilder-Samples copied to clipboard

Uploaded attachment option in sample throws content length error

Open sbuffkin opened this issue 8 years ago • 3 comments

Github issues for C# /JS / Java/ Python should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Sample information

  1. Sample type: \samples\
  2. Sample language: nodejs
  3. Sample name: 15.handling-attachments

Describe the bug

"Uploaded Attachment" causes an error [onTurnError]: Error: The request content length exceeded limit of 262144 bytes. This occurs in at least webchat, facebook and slack. Additionally, these channels appear to not allow uploading a new attachment in place of the old one.

To Reproduce

  1. Set up sample
  2. Begin conversation with bot in webchat
  3. select option 3 'Uploaded Attachment'

Expected behavior

Give a clear and concise description of what you expected to happen. Card saved within bot 'architecture-resize' should appear, it is a reasonable size as well (less than 1mb)

Screenshots

error

Additional context

So it seems that this picture is considered too large for the channel, but it really seems like this one is smaller than what would be expected in production environments.

[bug]

sbuffkin avatar Sep 24 '18 23:09 sbuffkin

Just double checked to make sure setting an image under 263kb would allow this function to work (the original image is 1kb above the limit).

It does, but it still seems like this limit is awfully low, trying to find where it is set at the moment.

sbuffkin avatar Oct 01 '18 22:10 sbuffkin

Jason is looking to double check this doesn't happen in the C# repo. I'm currently looking in to where in the system this limit is being set. Checking into the SDK and channel connectors.

sbuffkin avatar Oct 08 '18 23:10 sbuffkin

This also happens in c# going to resize the image.

JasonSowers avatar Oct 09 '18 18:10 JasonSowers