server-client-python
server-client-python copied to clipboard
Set FILESIZE_LIMIT_MB via environment variables
In one of my current projects I have to upload datasources to a tableau server behind a reverse proxy that only allows a maximum file size of 30MB. Due to different reasons it is not possible to change this limit.
In this PR I suggest to extend the existing Config class to provide the FILESIZE_LIMIT_MB variable via an optional environment variable. The default value stays at 64MB.
Thanks for the contribution! Before we can merge this, we need @Der-Henning to sign the Salesforce Inc. Contributor License Agreement.
Looks ok overall. I think as well as/instead of just setting the default value to 64, you could return the smaller of the two values, so people don't try putting in a larger value and hit server errors.