Android Question poststring pdf to base64

Uniko Sistemi srl

Active Member
Licensed User
Hi everyone.
I have a problem and I don't understand.
I make a call to a server with a php with job.PostString where I send a series of data including a base64 encoded PDF. Everything works as long as the pdf file does not exceed 1 MB
Does anyone know if there are maximum sizes? If I manually insert the base64 string into the server I can do it, but via code I can't.
Thanks everyone!
 

MicroDrie

Well-Known Member
Licensed User
Hi everyone.
I have a problem and I don't understand.
I make a call to a server with a php with job.PostString where I send a series of data including a base64 encoded PDF. Everything works as long as the pdf file does not exceed 1 MB
Does anyone know if there are maximum sizes? If I manually insert the base64 string into the server I can do it, but via code I can't.
Thanks everyone!
The short answer is that the information to be sent must always be smaller than the buffer space of the receiving party. It's nice that it works with a larger buffer length. As long as this is indeed the case, you will be fine, but I would still recommend that you check the length of the base64 information to be sent to prevent a piece of information from being lost if you do not have 100 percent complete control. about the length of the contents of the PDF file. Especially if the PDF contains graphic images, the required information can quickly add up. If the buffer is too small, an abrupt end occurs where information is lost. A base64 explanation can be found here: Base64 Encoding: What Is It? How Does It Work?
 
Upvote 0
Top