upload: Use more compact ?? operators and such
This makes the code more compact and more readable while doing the
same as before.
One relevant note: I'm also removing a null check for a variable
that will be used as an array index. This is fine because of the ??
operator. What actually happens is an $maxUploadSize[''] array
access, which never exists and falls back to what comes after the ??.
Change-Id: I7fc82fd179c9594ce5755327523ceec4f502d14f