Skip to main content
abhargavc0002
August 25, 2023
Solved

length of Encodebase64tostring

  • August 25, 2023
  • 10 replies
  • 0 views

I have a requirement where we need to send data from tables to PUB/SUB API in JSON formate . for this i tried fetching data from tables using queryentity then converting data to json .While sending we also converting that data to encodebase64string  and touniformstring . here the issue is we are unable to send large amount of data because encodebase64string has limit on characters . Is there any alternate way  to send data .

Thanks,

Best answer by mathieud0001

There is a way but it is somewhat convoluted.

First you need to store the json in the Database and then query it back using a stored procedure and TO_BASE64 MariaDB function.

mariadb.com/.../

10 replies

mathieud0001
August 25, 2023

Do you have to encode it in base 64? What's wrong with just sending the json?

abhargavc0002
August 25, 2023

yes we need to encode in base64 . because body of json is expected to enocde to there API 

mathieud0001
August 25, 2023

There is a way but it is somewhat convoluted.

First you need to store the json in the Database and then query it back using a stored procedure and TO_BASE64 MariaDB function.

mariadb.com/.../