I too am having this issue. I went to reupload my main world my friends and I play through realms because I was updating a datapack. I am many attempts in, but consistently have the realm upload fail at the verifying stage, giving the 504 error. That is, if it even reaches that stage. I've also had multiple instances of the upload failing at any percent between 0 and 100 saying “Upload failed! (-1)”. In the past I've had minor issues with realm uploads, but ultimately was able to eventually upload a world successfully after a few attempts. This, however, is ridiculous, considering I still haven't had a successful upload over the past 4 hours of attempting. This desperately needs to be fixed!
Incredibly disappointed in how this is being handled. An issue like this should not take over half a year to be resolved. There's been little to no acknowledgement of this, which is even more frustrating.
This is still an issue in 1.21.10 and I have yet to find any workarounds to fix the issue on my end. It is very clearly a server-side problem. Mojang seriously needs to fix this soon before I and many others jump ship to third party server hosts.