

A great resource can be found here and here.

I’m not going into the details of Base64 encoding itself. In that way there is no dependency on any table. Storing base64 code into the database will cause huge performance issue and it will eat your huge database storage space. Instead, that just saves the path of the uploaded image to the database. For binary data the code works with InStream and OutStream variables. Notes: It is advisable not to save base64 code into the database. The Codeunit is now supporting both text and binary data. That was another challenge that I just wanted to pick up. Because they were talking about a file I figured the code should not only support strings, but also binary data. And apparently, people were still interested in having the code. However, a new question came up about Base64. So I decided to not publish the code and wait for the next update. Aenean efficitur nunc ac lectus pretium, ut semper odio mattis. At that moment, I already read in a GitHub issue that Microsoft promised to make the Base64 functions on TempBLOB table available in the next update. Aenean felis purus, aliquet vel malesuada egestas, iaculis ut odio. Well, it turned out that it was possible and I ended up with a Codeunit that was able to convert a string to Base64 and also back into a string. Just as an excercise and at that moment I didn’t know if I would even succeed. So I decided to write Base64 encoding / decoding routines myself. Net, I figured it was going to take a while before we get Base64 support in AL code. And because those functions on the TempBLOB table are using. Unfortunately, at that time, it was not possible to call the Base64 methods on the TempBLOB table. He is building up a great library of very useful video’s, so make sure to check out his YouTube channel!Ī couple of weeks ago, I was trying to write web service examples in AL code for VS Code.
BASE64 TO IMAGE CONVERTER UPDATE
Update June 13th, 2020: In this video, Erik Hougaard discusses this code and improves the performance dramatically by making use of the TextBuilder variable.
