I’m developing a merchandise conference app. The lecturer needs to take a photo of the merchandise and then at the end of the conference I need to send the image via Json base64 to an external api. Can anyone help me how to get the image and convert it to base64?
if you found it helpful please mark it as a solution for future people
Did you fix it?
@Mikolaj_Krajewski_Wario_S KIO4 extension did’not work for me.
When we add that base64 into json it gives 400 error. Because KIO4 adds linebreaks into Bas64 and the characters, breaks json structure rules.
So we cant send those files.
You might use replacement blocks for \n
with empty string to fix the line breaks.
Try
Taifun
It is \n
Taifun
Thanks Taifun for notice my typing mistake.
Actually its possibly because of the length. its mmore than 64500 characters. So I should not take picture and send them directly
Itried image picker and picked little image but having same error again. It claims that bsae 64 string breaks due to escape character. It might be too long.
Itried another ase64 tool (Filey), same error again.
Has anyone tried to send base64 string via restful API.(json reuqests)
Update: if I convert same iimages online and set those base64 string , I can easily send my requests. So sending 64 is not wrong. But all extensions that convert images to base64 are wrong.
Well… yes, sure. . All extensions do not work… of course …
what abour providing a screenshot of your relevant blocks? How large is your original image? Try a small ome…
Taifun
Used some other extension and removed all \n occurenncies and it started working .I missed something Iguess.
Thanks all of you.