Exception:
I was getting "The action you performed was invalid for your session. Please refresh your page and try again."
Resolution:
If you are facing this issue when the guest user uploads files or documents, then enable “Allow site guest users to upload files” in the Files –> General Settings.
Please check the following blog post for more information on this feature enablement.