Server error when uploading files with Cloudflare switched on

We have a number of websites which all use Cloudflare.

Only one of the sites returns file upload errors when trying to upload a file using the CMS backend (Django/Mezzanine). This is overcome by temporarily pausing Cloudflare, uploading the required file(s) and then restarting Cloudflare. But this is not ideal for clients when administrating their own websites!

On a technical point, the only immediate thing that is different between the sites is the version of Ubuntu on the websites that don’t return a file upload error. (Ubuntu 20.04)

The site that returns the error when Cloudflare is switched on is running on Ubuntu 22.04

Has anyone else had a similar problem? And if so, how have they overcome it?