-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAX_EXPIRE_SECONDS
, MAX_DOWNLOADS
, and MAX_FILE_SIZE
env variables don't change UI dropdowns
#33
Comments
Based on https://github.com/timvisee/send/blob/master/server/config.js it looks like I might have to set If that's the case, should the documentation + example compose file be updated to include these extra vars that need to be set to update the UI? (also are the |
I managed to increase it to 100k downloads and 365 days max, but I still cant get it to allow more than that no matter how I set the environment variables. It seems to ignore anything over those values, but I cant figure out where they're hardcoded. This config should allow services:
send:
...
environment:
...
# Edit: (this is broken, see bottom of this comment for working version)
- EXPIRE_TIMES_SECONDS="[3600, 86400, 604800, 2592000, 31536000, 157680000]"
- DEFAULT_EXPIRE_SECONDS=157680000
- MAX_EXPIRE_SECONDS=315360000
- DOWNLOAD_COUNTS="[1, 2, 5, 10, 15, 25, 50, 100, 1000, 10000, 100000, 250000]"
- MAX_DOWNLOADS=250000
- MAX_FILES_PER_ARCHIVE=4096
- MAX_ARCHIVES_PER_USER=4096
- MAX_FILE_SIZE=10747904000 Edit: the config is making it to the frontend correctly in Edit2: Aha! A clue here. I think the array config vars are parsed as CSV, not JSON. It's breaking the first and last values because of the |
Ok got it working. Changing the array config options to CSV values worked. Here's the final working config to allow up to 10GB uploaded for 5yr and 250k downloads. services:
send:
...
environment:
...
# these update both the backend limit and the limit shown/enforced in the UI
- MAX_FILE_SIZE=10747904000
- MAX_FILES_PER_ARCHIVE=1024
# these update the UI dropdowns and should be a CSV of bare integers (first value is used as the dropdown default)
- EXPIRE_TIMES_SECONDS=3600,86400,604800,2592000,31536000,157680000
- DOWNLOAD_COUNTS=1,2,5,10,15,25,50,100,1000,10000,100000,250000
# these are global limits enforced by the backend and have no effect on the UI
- DEFAULT_EXPIRE_SECONDS=157680000
- MAX_EXPIRE_SECONDS=315360000
- MAX_DOWNLOADS=250000 |
MAX_EXPIRE_SECONDS
, MAX_DOWNLOADS
, and MAX_FILE_SIZE
environment variables ignoredMAX_EXPIRE_SECONDS
, MAX_DOWNLOADS
, and MAX_FILE_SIZE
env variables don't change UI dropdowns
Ok I opened 2 PRs to improve the docs and example configs:
You can probably close out this issue now, or wait till the final PR is merged, up to you 👍 |
Hi, thanks for maintaining this fork! Really appreciate it.
UPDATE: I figured it out, here's a final working config to allow up to 10GB uploaded for 5yr and 250k downloads.
Original ticket:
Changing
MAX_EXPIRE_SECONDS
,MAX_DOWNLOADS
, andMAX_FILE_SIZE
seems to have no effect on the UI when running with the latest Docker image, the dropdowns still only show the default maximums:I know the environment variables are being read, because
BASE_URL
FILE_DIR
are being set correctly when I change them.Here is my
docker-compose.yml
config:(based on https://github.com/timvisee/send-docker-compose/blob/master/docker-compose.yaml)
Versions:
Ubuntu 20.04 (amd64)
v20.10.6
v1.28.5
latest
(Digest:9144b0f
from https://gitlab.com/timvisee/send/container_registry/1418504)The text was updated successfully, but these errors were encountered: