Page 1 of 1

Publish Restful returning object as base64string (>65535)

Posted: Thu Apr 29, 2021 10:59 am
by Dino
Hi

I am trying to publish a restful API, using a server module, but I want to return between that information, an object with base64string information.
Starting with the basic example, I would think the idea is to add another property and instead of making it a field, make it an object, then populate the object with something like this...

#STD_QSEL := 'c:\temp\DIYStand.pdf'
#File.FromFile Path(#STD_QSEL)
#File.FromBase64String String(#File.AsBase64String)

but when trying to add a property, Type Object, it keeps telling me that it need an Schema property...

Has anyone done that yet? Any ideas how to approach it?

thank you

Re: Publish Restful returning object as base64string (>65535)

Posted: Fri May 07, 2021 6:01 pm
by Dominik
Hi Dino, did you uh, add a schema property like it suggests?

An object is a JSON object, a collection of String, Number, Array properties lumped together. It is not an object until it has at least one property.

A base64 string encoded file would be a string type property in your object.

Re: Publish Restful returning object as base64string (>65535)

Posted: Wed Jul 20, 2022 2:49 pm
by gillettd
Hi Dino,

Just Wondering if you had any luck with this?

Cheers,

Dominique