Skip to main content

Notifications

Announcements

No record found.

Business Central forum
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.
Categories:
  • 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 8,734 Most Valuable Professional on at

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,126 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans