Thanks Jacque, Simon and Richard.
I hope to try all of this over the weekend.
Here is what the HOSTM people told me: (by the way they are
extremely responsive when asked a question)
"Both JPG and PDF are binary files.
Although, whether or not an array contains binary data shouldn't (isn't intended by LiveCode Ltd) to make any difference when it comes to transmitting arrays via arrayEncode and arrayDecode.
On the other hand, we have on some occasions encountered unexpected/unexplained issues with arrayEncode and arrayDecode, and this could be one of those.
On the client side, try doing a base64Encode() on the array element containing the PDF before transmitting the array using your usual (unmodified) arrayEncode statement.
Then, after receiving it at the server side using your usual (unmodified) arrayDecode statement, do a base64Decode() on the same array element."
They also offered the following after not hearing back from me quickly:
"Just checking in to see if you've resolved the issue regarding sending PDF files.
If not, we have a new general-purpose LiveCode API demo that we can place in your account if you like, so you can perhaps extract some code or ideas from it for your specific usage.
This 100% free API demo is meant to provide LiveCode users with examples of how to communicate between a LiveCode desktop/mobile app and a LiveCode server script.
The current examples are mostly about connecting to MariaDB/MySQL, but one of it also shows how you can transmit files over. It does work with PDF, PNG, and JPG (and likely pretty much any other file type).
The API demo relies on JSON rather than arrayEncode/arrayDecode, and therefore appears to be more robust.
It also works with both LiveCode 6 and 7, both on the server side and on the client side. arrayEncode/arrayDecode seems to be more finicky when different LiveCode versions are involved, even when a specific version is specified for arrayEncode.
Another benefit of using JSON is that the LiveCode-based server-side API can (if desired) be used by client apps written in any other programming language.
If you'd be interested in having a look at the new API demo, feel free to let us know."
This has led me to try easyJSON found here:
https://github.com/luxlogica/easyjson
There is also an external that requires a license for the app I am working on called MergJSON.
I will let you know what I find out.
Thanks again for all the help I get on this forum.
Tom