microsoft / BCApps

Repository for collaboration on Microsoft Dynamics 365 Business Central applications.
https://microsoft.github.io/BCApps/
MIT License
303 stars 146 forks source link

[Bug]: Reasoning for Image Codeunit being limited to 5MB? #1970

Open mjmatthiesen opened 1 week ago

mjmatthiesen commented 1 week ago

Describe the issue

Originally started here.

The following limit is implemented.

This prevents processing larger images that may need to be cropped or altered in some fashion. This means we now have to make a request to an external service, process the return, etc., greatly increasing overhead and generally being slower, "locking" BC for more time.

Expected behavior

Have the limit be configurable, removed, or higher.

Steps to reproduce

pass in image that is larger than 5mb and get hit with error

Additional context

typically we process labels of some sort from an external service, e.g. ucc labels, and some services will return all images in a single image we then need to split and process to store and print correctly. Because of this limit, we are unable to use the built in BC tools and instead have to rely on external services.

I will provide a fix for a bug

Additional note

There may be a legitimate reason for the 5MB limit. This is more a hope that it can be changed in the future.

JesperSchulz commented 1 week ago

Asked internally if anyone remembers where that limit came from. Stay tuned!

JesperSchulz commented 2 days ago

No one remembers and I cannot find any reasoning. Hence approving issue.

mjmatthiesen commented 2 days ago

No one remembers and I cannot find any reasoning. Hence approving issue.

Just want to clarify one thing: Does Microsoft still want a limit, or is no limit acceptable? I have a limit of 50MB in mind, but since I don't know the actual backend implication, if none is possible that would be "future proof" for us.

JesperSchulz commented 1 day ago

No one remembers and I cannot find any reasoning. Hence approving issue.

Just want to clarify one thing: Does Microsoft still want a limit, or is no limit acceptable? I have a limit of 50MB in mind, but since I don't know the actual backend implication, if none is possible that would be "future proof" for us.

A limit is preferable. Uploading an image of several GB can derail the production system. 50MB sounds reasonable.