Not sure if there is an example anywhere, but what parts are you interested in?
I kinda do something like this, uploading a file to the XData server. The gist of it is like this.
WebCore:
- Create a WideString variable containing the Base64-encoded data.
- eg:
SendFile := Window.BtoA(SomeFile);
where SendFile is a WideString. - Not clear how you get the SomeFile in there, but probably not too hard.
- Make usual call
Response := await(Client.RawInvokeAsync(Service,[SendFile]));
XData:
- Service should be setup with [HttpPost] so that SendFile can be arbitrarily large.
- Use
TNetEncoding.Base64.Decode
fromSysUtils.NetEncoding
unit to decode to stream. - In my case, I just dump the file directly into a database still base-64 encoded.