I have a system where I can use an api to get a backup as base64
I save this backup inside a mssql server
I then want to be able to download those backup with perspective
If I send the base64 data as plain text, I’m able to convert it using powershell to a working archive
I use binascii.a2b_base64 to convert to base64 string to bytes
When I check the size of the result, using “len”, I have the right number 773758, that is the expected file size, but the file I receive using the following is 1160274 bytes.
I would use a Java function to convert the base64 to bytes; there's a lot of layers of translation involved if you use a Jython method.
Try this snippet to get a byte[]:
Then you’ve got all the third party repos we bring in; depending on what scope you’re in this will be different, but you can take a look at the .ignition cache, or look in the gateway’s lib/ directory - you’ll find .jar names, which are usually pretty self explanatory/let you find your way back to a documentation page.
It’s effectively impossible to document it all, especially since it’s subject to change between versions; the system. scripting libraries are technically the only officially exposed way; but, for instance, that Base64 module in our common directory is so deeply tied to our code (and has been for years) that it’s pretty much perfectly safe to use.