Return binary for a file instead of Base64 Encoding

Hi,

My delphi projects adds a file by reading a stream:

FileBin := Binary.Create();
FileBin.LoadFromFile(AFileName);

etc.

Is there a way to disable base64 encoding on my HTTPApi client? That would save 50% of the size.

Thanks,

Hi,

pls read the HttpAPI in details article

Thanks. How can I set the result of the method to be TROHttpApiResult in the service builder?

Hi,

you can return Binary.

TROHttpApiResult is descendant of Binary:

TROHttpApiResult = class(TROBinaryMemoryStream)

Hi,

Searching the sources and samples fro TROHttpApiResult returns no hits. Am I missing something? What usinit is this class in?

Hi,

uROHttpApiUtils contains this class.
what RO SDK version you are using? you can see it in ROVersion.inc

Hi,

I have that unit but not that method.

I’m using 9.4.109

Hi,
this feature was added in ROSDK 9.5 - https://talk.remobjects.com/t/remoting-sdk-custom-result-content-type/17340

as a workaround, you should update your version of SDK.

Ok then I need to update my subscription for that feature unless there is another way.