-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Support DATA_UPLOAD_MAX_SIZE_MiB in .env #3251
Conversation
- improve nginx config - fix DATA_UPLOAD_MAX_MEMORY_SIZE default not being an int - translate fallback value in id_to_username template tag - make location of setting to turn on user exports easier to locate for admins fixes bookwyrm-social#3227 fixes bookwyrm-social#3231 fixes bookwyrm-social#3232 fixes bookwyrm-social#3236
# Maximum allowed memory for file uploads (increase if users are having trouble | ||
# uploading BookWyrm export files). | ||
# DATA_UPLOAD_MAX_MEMORY_MiB=100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Preferring to leave this commented out so that settings.py can change the default value and have it affect default installs.)
I think this is going to be in conflict with #3238? |
Since arithmetic is not allowed in .env files, a change in unit for the variable seems most usable.
3bce4bd
to
4a9d69e
Compare
Thanks I'll take a look soon. We're likely to have a few PR conflicts because I left a bit of a mess earlier and lots of people noticed 🙃. I'll see if there's a way to pull it all in to one PR. |
I've merged this into #3238. That will be ready for review again once I sort out some issues with the Reverse-Proxy nginx settings. |
Great! Closing this one then. |
Since arithmetic is not allowed in .env files, a change in unit for the variable seems most usable.
I missed #3226 during review, but while I was editing .env.example for another PR, I noticed the
(1024**2 * 100)
syntax, which I don't think would be allowed in the actual.env
file and hence could lead to confusion?In cases like this, I think it's best to overshadow Django's own setting with a Bookwyrm-specific variable name, in another unit (MB in this case). Thoughts?
NOTE: I mark this PR as draft because, as implemented, it's not strictly backwards compatible (if, following .env.example, an admin set
DATA_UPLOAD_MAX_MEMORY_SIZE
in the environment for 0.7.2, this would no longer be honored). I do believe this will merit a mention in the release notes, but I don't think it would make sense to allow two variables in different units, from .env.