It sounds like you are running into the same issue at two different levels of the platform.
In the 800KB file case, the encoded file content being placed on the payload and then submitted for running within the workflow engine, but the encoded file exceeds the maximum starting payload size, which is leading to an error at that level.
For the 2MB file, our endpoint request handler is blocking the file submission before it ever hits the workflow engine and automatically replying with a 413
status code and appropriate error.
I have a workaround in mind but it will take a bit of work. Essentially it involves doing the following:
- Updating your form to submit asynchronously, if it is not doing so already.
- Submitting not the file itself to your endpoint, but the file’s name, size, and content type, which can be accessed using JavaScript’s File API.
- In your workflow that fires on submission, use the Losant API Node and the Files: Post method to get a signed URL for submitting the file directly to Amazon S3.
- Reply to the request with the signed URL.
- Immediately kick off a separate request to the signed URL and post the file to that.
I need to test this flow out but I think it would work; if successful, I’ll post a sample application here and probably also submit it to our Template Library.