We have a smart action to upload a document which is behind a request approval workflow when we go to trigger the action we get an error of “You don’t have the right to trigger this action anymore.” And if I check my console I’m getting an error of the Payload Too Large.
But when I remove it from the request approval workflow and make it so the smart action just triggers the request goes through, which makes me think it’s not related to the file size but some error on the request-approval side.
As on Forest Admin and on our server we have the file size limit to be 20mb and the file that we’re currently uploading is 4mb
Expected behavior
For the smart action to execute successfully and go to the request approval workflow
As we have no storage of our own on the agents side (and obviously can’t create tables on your database), approval workflow works the following way:
When the approval request is submitted, the content of the smart action form is saved in our servers
When an authorized user accepts the approval request, the frontend downloads the content of the form from our servers, and replays it to your agent (the approver is the one submitting the smart action).
The issue that you are having is that the initial form submission is larger than the max body size in our server.
I asked the performance team, and wrote a PR to increase that limit to 20mb on our side, but I’m still waiting for my coworkers to review and merge it.
I want to see if we can re-open this back up as the same issue is happening again for us we’re uploading a 6.8MB PDF and when we go to approve the action we’re getting the 413 payload too large error.
And if I do it without the approval workflow it goes through normally
We’re on sequelize 8.5.14 and it’s been working ok in the past it’s happened before but your team mentioned it was a bug and fixed it. So not sure if it’s come back again
I am sorry for the late answer.
The explanation for your 413 is probably normal because of the following processes:
When using a form with hooks, all fields are sent x2 times to have the precedent values and the new ones.
When using a file, it is sent in format base64, so the size of the image in the payload will be x (4/3).
And obviously, the payload will take into account all the fields from the form.
With these, I think that with a 6.8Mb image X (4/3) X 2 + other fields x 2, it could reach a payload of 20Mb and sending you a 413 payload too large.
Unfortunately, we will not increase this size limit.
Unfortunately, the approval system with upload of files is not well supported. If you need this size of file, you will have to deactivate the approval system.