Closed kosli closed 1 year ago
The ansible-openwisp2 role handles it with the var openwisp2_firmware_upgrader_max_file_size
:
Please before opening issues reach us in our general gitter/matrix chat.
I am using the ansible-galaxy (openwisp.openwisp2, 22.5.2) role and I have set
openwisp2_extra_django_settings_instructions:
- |
OPENWISP_FIRMWARE_UPGRADER_MAX_FILE_SIZE = 50 * 1024 * 1024
Unfortunately only the settings.py on the server gets changed. Whereas even there, the line in the middle of the file stays as
OPENWISP_FIRMWARE_UPGRADER_MAX_FILE_SIZE = 31457280
whereas a new line gets added at the bottom of the file:
OPENWISP_FIRMWARE_UPGRADER_MAX_FILE_SIZE = 50 * 1024 * 1024
this seems to be a bug so that is why I created the issue here instead of asking in the matrix chat.
The nginx site conf does not get changed. And if I have changed it manually it gets reverted back to
client_max_body_size 31457280;
I also tried using
OPENWISP_FIRMWARE_UPGRADER_MAX_FILE_SIZE = 52428800
instead of 50 1024 1024 but the behavior is the same.
Use openwisp2_firmware_upgrader_max_file_size
.
Thanks @nemesisdesign
Note for others: openwisp2_firmware_upgrader_max_file_size
is an ansible variable and NOT a django setting ;-)
Yes, an ansible role variable, see here: https://github.com/openwisp/ansible-openwisp2#role-variables.
I have set the OPENWISP_FIRMWARE_UPGRADER_MAX_FILE_SIZE to 50MB (50 1024 1024). The nginx site conf does not get changed, whereas the firmware upload limit in OpenWISP itself indeed gets changed as after changing the nginx conf manually (which gets reverted by the ansible playbook!) I could successfully upload the firmware image.