Unable to change 4MB photo upload limit
In WebChat, the limit for “Images” is set to 4MB. This is problematic when using phone cameras to upload images for processing.
I don't think that limit is set by WebChat.
Hi @andynorton I don't believe we are setting any limit in the client side code, but we have seen similar reports for DirectLine. Can you provide a conversationID so that we can inspect on our server side?
An Azure Escalation Engineer said that “For WebChat, the limit for “Images” is set to 5MB. In my testing, I also noticed that the limit is currently 4MB.”
We’ve been unsuccessful when changing web config max file size options.
Seriously, the limit is not set by WebChat.
Okay thanks for coming back to me, would you have any suggestions on how this might be happening outside of WebChat, as we’ve struggled with anything over 4MB?
Please see my comment above
Hi @danmarshall - Conversation ID: AphyPzEXUHlJlBQclkCiqD. We've submitted 3 images under 4MB and 3 over.
@danmarshall - is that Conversation ID of any use?
Hello @andynorton - there was an error reading the multipart MIME body. Can you please share a file which causes the issue?
Hi @danmarshall - https://1drv.ms/i/s!AkI2BTKSRBbJhLpiIFwFrV-a3z1LAQ
An image over 4mb should cause the issue in our testing.
Thanks @andynorton that was very helpful. I've reproduced the error, and it is being limited on the server side in Direct Line. So, 4MB will be the max size limit until further notice. Sorry you had to find out with ad hoc testing, we should publish this in our documentation. Our team will be reviewing the size limit policy.
Thanks @danmarshall, we’d love to help out with any testing if this limit is increased in future. Could you post a link to the documentation you mentioned?
The documentation we have is for the Direct Line Rest API itself: https://docs.microsoft.com/en-us/bot-framework/rest-api/bot-framework-rest-direct-line-3-0-send-activity#upload-attachments
But - I do realize that's opaque to you and other Web Chat developers, since you're a downstream consumer of this. You're just using Web Chat, which uses DirectLineJs, which uses the Rest API.
I imagine that we need to support modern phones, which are something of a moving target wrt cameras and photo file sizes.
Thanks for the help offer @andynorton :) We welcome your (and the community's) suggestions as to what this limit might be.
I think @andynorton has his point. And we need to think about an API that filter the user upload before sending it to the server.
Like an async call so dev have chances to downscale photos on JS side, or block uploads which doesn't meet some requirements.
Any updates regarding this? And why this is marked as enhancement? I receive 500 error code from direct line when i try to upload something bigger. This should be marked as bug.
This is marked as an enhancement because it is by design.
@billba Should't there be some validation or least a place to hook in your own validation?
Receiving error and chat getting stuck* doesn't feel like by design. And there is now good way that i know to inform customer that file size was too big.
- Stuck - stopping the chat flow until you type something else.
Fair enough.
From: mralnis [email protected] Sent: Tuesday, February 20, 2018 8:28:19 AM To: Microsoft/BotFramework-WebChat Cc: Bill Barnes; Mention Subject: Re: [Microsoft/BotFramework-WebChat] Unable to change 4MB photo upload limit (#789)
@billbahttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbillba&data=04%7C01%7CBill.Barnes%40microsoft.com%7Ca87dd97a96ce4b7d0f1808d5787ef3e3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636547409008296842%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=Rxpl3ghmI5bYIweU9d%2FbXScIAAQ9nokuDi73ORGpCEs%3D&reserved=0 Should't there be some validation or least a place to hook in your own validation? Receiving error and chat getting stuck* doesn't feel like by design. And there is now good way that i know to inform customer that file size was too big.
- Stuck - stopping the chat flow until you type something else.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FBotFramework-WebChat%2Fissues%2F789%23issuecomment-367034097&data=04%7C01%7CBill.Barnes%40microsoft.com%7Ca87dd97a96ce4b7d0f1808d5787ef3e3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636547409008296842%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=voqH6BEprl7jYguUuWr1BLItPt65M%2FKy7XRBKeabdBY%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKietwUI4zhdISQNrz5IJFzC3pekejqIks5tWvKdgaJpZM4Qi6b9&data=04%7C01%7CBill.Barnes%40microsoft.com%7Ca87dd97a96ce4b7d0f1808d5787ef3e3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636547409008296842%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=7QmZhkqvnRwagE%2BohLXNTth29AhoLFg%2F6W8GDBpKK4A%3D&reserved=0.
This is annoying, my new phone camera takes 4K photos by default, the photo size goes up to 9MB easily. And there's no setting to reduce the image resolution. Please fix this. Thanks.