Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

Custom Attachment Upload API

Posted on by 5
Hello,
I've built a custom API that takes JSON data with base64 encoded document. it works well but if the file size is greater than 1MB server returns this error,
 
/One or more errors occurred. (The maximum number of bytes allowed to be read from the stream has been exceeded. After the last read operation, a total of 1063435 bytes has been read from the stream; however a maximum of 1048576 bytes is allowed.)/
 
can anyone suggest an answer or if I need to change my approach. I know the standard way of uploading attachment through API is /post+patch/ but the client specifically wants to send a single request for attachment upload.
  • Custom Attachment Upload API
    We have a custom API that uploads files that started to fail for files bigger than 1MB around January 29th. We have seen the same on several Business Central installations. I have now seen information from Microsoft that this 1MB limitation is a bug and that a fix is rolling out now, as of February 1st. It might take a few days to reach all installations.
  • gdrenteria Profile Picture
    gdrenteria 12,167 Most Valuable Professional on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans