Suggested ways of splitting JSON upload

We are needing to pass a large dataset that’s size can fluctuate to our Xojocloud webserver from an IOS device. When the dataset is small we are fine with just using JSON and sending it up. Eventually we are hitting size limits allowed by the webserver because we are getting returned a http 413 error.

Because we cannot use SFTP or other file transmission protocols from IOS with Xojo. We need to come up with a way to split the JSON into multiple upload blocks and have the XojoCloud Webserver combine everything back together. With the nature of TCP communication its going to need to be able to handle blocks getting there in the wrong order and be able to know when it has all of them.

I am not an expert in this so looking for recommendations on how to achieve this?

Why not limit the number of records that can be sent in any given block? That way you can say this is block 1 of 10, 2 of 10, etc. and be able to recreate it in the end. If you don’t receive all blocks then you know something went wrong.