The first two systems I worked with using InterSystems technology were a PDP-11 running M11+ and a VAX 11/750 running M/VX. Too many years ago to count! 😊
Since then I've used most, if not all, InterSystems products up to IRIS and HealthShare today.
I'm Italian living in Switzerland and I work as Senior Consultant at GAIVOTA consultin SA, we provide professional services for InterSystems and other technologies.
Curiosity: apart from DC, I don't have ANY social account! 😁
Just add another "if" within the "else" block?
To can get a base64 encoded value from JSON DynamicObject into a stream you don't need to write any conversion code using:
Set stream = jsonObject.%Get("data", , "stream<base64")
Bonus: this works with any data length, is not limited to the IRIS max string size as in the above article.












Just a little trick, instead of:
set file="/ext/Stream.html" set stream=##class(%Stream.FileCharacter).%New() set sc=stream.LinkToFile(file)
You can use:
set file="/ext/Stream.html" set stream=##class(%Stream.FileCharacter).%OpenId(file)
😉