mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-09-01 01:30:14 +02:00
* Rest bridge returns blob as base64 encoded data
This commit is contained in:
parent
3d687576c6
commit
ae4df85df3
@ -77,6 +77,7 @@ Type
|
||||
procedure SetResourceName(AValue: String);
|
||||
procedure SetSQL(AValue: TStrings);
|
||||
Protected
|
||||
Class Function DefaultBlobDataToBytes(aValue : JSValue) : TBytes; override;
|
||||
function DataPacketReceived(ARequest: TDataRequest): Boolean; override;
|
||||
function GetStringFieldLength(F: TJSObject; AName: String; AIndex: Integer): integer;virtual;
|
||||
function StringToFieldType(S: String): TFieldType; virtual;
|
||||
@ -326,6 +327,13 @@ begin
|
||||
FSQL.Assign(AValue);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
class function TSQLDBRestDataset.DefaultBlobDataToBytes(aValue: JSValue): TBytes;
|
||||
begin
|
||||
Result:=BytesOf(Window.atob(String(aValue)));
|
||||
end;
|
||||
|
||||
function TSQLDBRestDataset.DoGetDataProxy: TDataProxy;
|
||||
begin
|
||||
Result:=Connection.DataProxy;
|
||||
|
Loading…
Reference in New Issue
Block a user