RegEx := RegEx.Regex('data\:image/(.*?);base64,(.*)'); Match := RegEx.Match(DataUrl); IF Match.Success THEN BEGIN MemStream := MemStream.MemoryStream(Convert.FromBase64String(Match.Groups.Item(2).Value)); Rec.Picture.CREATEOUTSTREAM(OutStr); //This Row COPYSTREAM(OutStr,MemStream); Rec.MODIFY; CurrPage.UPDATE(FALSE); END ELSE ERROR('Invalid data type. Image expected.');
Answers