I am developing a small application with a low-code tool (Zoho Creator) and I intend to use PlantUML server to automatically generate Gantt diagrams (once a day or so).
It works well, but when the markup reachs a certain size, after converting it to hex and sending it to the server, the following error appears:
Forbidden
You don't have permission to access /plantuml/png/~h<4284 characters long hex string>
on this server.
I assume that this happens because the URL becomes too long.
I decided to send the server a compressed version, but the low-code tool does not have a deflate algorithm; it only has a function to convert a string into a ZIP file, so I tried the following (not very convinced that it would work, though):
- Convert the PlantUML markup to ZIP file
- Convert the ZIP file to Base64 text
- Convert the Base64 text to almost-Base64
Unfortunately (and as expected), I had no luck.
For the following markdown (I use it as a minimum example, since mine gets a lot longer):
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@enduml
I get this after zipping it, converting it to Base64, and finally converting it to almost-Base64:
K4i311G020W80AP6SLK0000000000000000B0000ON9ZQ6bsRrzrRMnpA2v9B2efpStXSip9J4vLqBLJSCfFib9mB2t9ICqhoKnEBCdCprC8IYqiJIqkuGBAAUW2rO0LOr5LN92VLvpAvP2Qbm8q4m1GImS8xCzb7qW0001T0000K4i10XG0500820W0faPnLUpFPHz80000NG0000i000000000000000000000065oOsXfTczVTMriK4i51W0000010040EG000840000000
Do you know what should I trim from the encoded string in order to make PlantUML server work as expected?
I cannot use any external libraries.
Thanks in advance!