In database, I have column blob, I need with rest services to send image from device to my database.
In rest services I have parameter PAR_BLOB, I'm try convert Byte to String and get error
Expected Blob got Clob
function BytesToStr(abytes: tbytes): string;
var
abyte: byte;
begin
for abyte in abytes do
begin
Result := result + IntToStr(abyte) + ',';
end;
Result := '[' + Copy(Result, 1, Length(Result) - 1) + ']';
end;
ABytes := TFile.ReadAllBytes('/storage/emulated/0/DCIM/Camera/IMG_20210410.jpg');
RESTrequest1.Params.AddItem('PAR_BLOB',BytesToStr(ABytes), pkREQUESTBODY, [], ctAPPLICATION_JSON);
Or any other solution?