Delphi Firemonkey XE8 – how to correctly send/receive images using DataSnap


I’m developing an Android app using Delphi Firemonkey XE8. I need to send images to the server, where a service has to receive and store them.

So far I was able to send and receive simple classes, like this:

TCliente = class
pCodigo: integer;
pNomeRazaoSocial: string;
pApelidoFantasia: string;
pCPFCNPJ: string;
property Codigo: integer read pCodigo write pCodigo;
property NomeRazaoSocial: string read pNomeRazaoSocial write pNomeRazaoSocial;
property ApelidoFantasia: string read pApelidoFantasia write pApelidoFantasia;
property CPFCNPJ: string read pCPFCNPJ write pCPFCNPJ;

The bitmap images are stored in a SQLite database as BLOB. I need to send those images to the server and, as soon as they get there, save them in the MySQL database, in BLOB fields as well.

I need to do it using DataSnap.

Everything I tried so far hasn’t worked.

Comments are closed.