Scripts get paths like ../../data/./file and then something breaks because nobody knows what they point to. realpath cleans that up.
realpath ../../data/./file.txt
It prints the canonical name of the file: an absolute path without extra slashes, without . or .. parts and without symbolic links. The GNU manual calls it the preferred tool for this, with readlink -f as the older option that overlaps.
The option I use less often but like more is --relative-to. From /usr/bin, the command realpath --relative-to=/usr/bin /usr/bin/ /tmp/foo prints . and ../../tmp/foo. That is exactly what you need to build a relative symlink target.
ln -s "$(realpath -m --relative-to=/srv/site/current /srv/site/shared/uploads)" /srv/site/current/uploads
The -m flag means the path does not have to exist yet, and -e demands that every part exists. By default all but the last part must exist.
One caveat: --relative-to only gives a relative result when the other path is below something you named. When you also pass --relative-base, names outside that base are printed absolute. On macOS the system realpath is more limited, so GNU coreutils may be needed for these options. Check realpath --help on your system before you rely on a flag in a script that has to run on both.
Further reading: GNU Coreutils: realpath invocation, Realpath usage examples