Bring back option to control max upload.

This reverts commit 9fdcca3e59f1687cce9881b17adf7929825be700.