I have a database that stores the location of the photo in the record, in the "foto" field.
Now I need to upload this to my server.
In GravarRegistros, using DBUtils.ExecuteJSON, I create the json that I want to upload to the server.
Registros results in:
I need Registros to result in:
Thank you in advance!
Now I need to upload this to my server.
In GravarRegistros, using DBUtils.ExecuteJSON, I create the json that I want to upload to the server.
GravarRegistros:
Sub GravarRegistros
Dim registros As JSONGenerator
Dim strsql As String = $"Select id, usuario, data, foto
FROM inspecao
order by id"$
registros.Initialize(DBUtils.ExecuteJSON(Main.SQL1, strsql, Null, 2, _
Array As String(DBUtils.DB_INTEGER, DBUtils.DB_INTEGER, DBUtils.DB_TEXT, DBUtils.DB_TEXT)))
...
jg.PostString(Main.URLServidor & "/app/receberjson.php?fotos", registros.ToString)
...
End Sub
Registros results in:
JSON:
{root=[
{id=1, usuario=33, data=2024-03-17, foto=pictures/1710690749110.jpg},
{id=2, usuario=33, data=2024-03-17, foto=pictures/1710690747581.jpg}
]}
I need Registros to result in:
JSON:
{root=[
{id=1, usuario=33, data=2024-03-17, foto=***PHOTO CONTENT***},
{id=2, usuario=33, data=2024-03-17, foto=***PHOTO CONTENT***}
]}
Thank you in advance!