I'm trying to convert an image to a String
base64 (I need to send it via POST ) and I can not get it. I use the following instruction:
String imgDS = DatatypeConverter.printBase64Binary(Files.readAllBytes(Paths.get(".\imagen.png")));
It is a large image with high resolution (2.2MB), therefore it generates a very large String
(2 million characters).
When I clean, I look at the variables and a strange thing happens. the variable "stringNormal" if it has its value next to it, but the variable imgDS does not. But when clicking on it, it appears below its value.
This variable I need to send it through a POST , but when sending it the server receives it empty.
Does anyone know what happens?
Thanks