Skip to main content
abhargavc0002
Participating Frequently
Aug 25, 2023 11:52 AM UTC
Solved

length of Encodebase64tostring

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,

mathieud0001
Genius
Aug 25, 2023 12:32 PM UTC

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
Genius
Aug 25, 2023 12:08 PM UTC

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

abhargavc0002
Participating Frequently
Aug 25, 2023 12:21 PM UTC

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

mathieud0001
Genius
Aug 25, 2023 12:32 PM UTC

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/.../