CC-5786: Quota Enforcement in the File Upload API

Tweaked this so it will work on self-hosted instances