-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to change 4MB photo upload limit #789
Comments
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: 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? |
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?
|
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. |
FWIW - here's a library that can resize the image prior to uploading: https://github.com/nodeca/pica |
@danmarshall Hi Dan, we are developing a feature which allows our users to attach a media file (image, video, audio etc.) to their notes. Is there any way that we can configure the maximum file attachment size? Otherwise, the file icon on the bottom-left of webchat window will be not so helpful since most files (images, videos etc.) in current phones will exceed 4MB. FYI, when I test the bot using Bot Emulator, it seems that it has a higher limit as I can upload 100MB files successfully. |
When I upload a 16.3 MB file, the server returned 500. Looks like our server has some hard limits. HTTP/1.1 500 Internal Server Error
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 51
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/10.0
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=31536000
Date: Mon, 08 Apr 2019 17:34:51 GMT
{
"error": {
"code": "ServiceError"
}
} |
Looks like we are using the default value for attachment limit (4 MB). I can upload a 3.999 MB file (1 KB short of 4 MB). But I cannot upload a 4 MB minus 1 byte file. |
I don't think we will change this value. Will need to find a way (write a sample) for Web Chat users to upload files using their our storage, e.g. blob storage with SAS key. Recommend to postpone to 4.5. |
Hi, it's now 2020 (almost 2021). Do we have an update about file size limit now? |
Hi, @compulim do we now support uploading by user's storage, if yes, could you give me a ref link? thanks |
It is annoying, that this tiny limit is still in place. When can we expect to have larger file support for WebChat over DirectLine that tiny 4MB? Is there an update on that limitation? |
@zhaoxing-msft What some clients have done is upload their file to blob storage from their web client / mobile app and then attach the URL to the activity to send to the bot. This had several advantages to manage the life cycle / access control of the file. In many cases, the bot needs to send the file to other backend services and having it already in blob storage makes that easier. |
In WebChat, the limit for “Images” is set to 4MB. This is problematic when using phone cameras to upload images for processing.
The text was updated successfully, but these errors were encountered: