You are not logged in.
Pages: 1
Hi Arnaud, i like to get an Object containing a RawBlob Field by SOA Call.
Blob is filled on Server side, but not sent to client, in JSON Blob:null is postet.
Is there an Option to send the Blob Data here ?
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
Yes i can:
Object looks like this:
TBild = class(TDFDomBase)
private
fBildID : TBildBildID;
fGUID : TBildGUID;
fBinaerdaten : RawBlob;
public
procedure SetBinaerdaten(const ABinaerdaten : RawBlob);
published
property BildID: TBildBildID read fBildID;
property GUID: TBildGUID read fGUID;
property Binaerdaten : RawBlob read fBinaerdaten;
property Datenformat : RawUtf8 read fDatenformat;
end;
SOA Function like this:
function FillBildStreamFromBDS(var ABild : TBild) : TresultRec;
begin
var LBinaerdaten : RawBlob;
Result := GetBildBinaerdaten(ABild.GUID, LBinaerdaten);
if Result.Erfolgreich then
ABild.SetBinaerdaten(LBinaerdaten);
end;
In Log Binaerdaten is null but was filled with 4MB PNG before
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
BLOBs are not retrieved by default from the ORM, to save performance.
There are dedicated methods to this purpose.
And also note that RawByteString are transmitted as base-64 encoded strings over JSON, so if you can, use a single input parameter or a TServiceCustomAnswer result, which will both use a single binary over the wire.
Offline
atm i us a SOA call which gives blob for guid to solve problem
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
Pages: 1