From 1dcb43a60799fb8a11665e3a2e7baf397fdfaa36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:58:09 +0100 Subject: [PATCH] cleaning --- conf/config.js | 2 +- config_panel.toml | 14 +++++++------- scripts/install | 2 +- scripts/upgrade | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/conf/config.js b/conf/config.js index 0af4b36..a0e9253 100644 --- a/conf/config.js +++ b/conf/config.js @@ -156,7 +156,7 @@ const conf = convict({ max_file_size: { format: Number, default: 1024 * 1024 * 1024 * 2.5, - env: '__MAX_FILE_SIZE__' + env: __MAX_FILE_SIZE__ * 1024 * 1024, }, l10n_dev: { format: Boolean, diff --git a/config_panel.toml b/config_panel.toml index 2ed17fb..0ac6a11 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -13,10 +13,10 @@ services = ["__APP__"] ask.en = "Max File Size" ask.fr = "Taille maximale du fichier" type = "number" - default = 2684354560 - help.en = "Define the maximum file size limit" - help.fr = "Définir la limite de taille maximale du fichier" - bind = ":__INSTALL_DIR__/server/config.js" + default = 100 + help.en = "Choose the maximum file size allowed to send (in Mo)" + help.fr = "Choisissez la taille maximale du fichier autorisé à envoyer (en Mo)" + bind = "max_file_size:__INSTALL_DIR__/server/config.js" [main.config.max_download] ask.en = "Max download" @@ -25,18 +25,18 @@ services = ["__APP__"] default = 100 help.en = "Define the maximum download limit" help.fr = "Définir la limite maximale du nombre de téléchargement" - bind = ":__INSTALL_DIR__/server/config.js" + bind = "max_download:__INSTALL_DIR__/server/config.js" [main.config.custom_title] ask.en = "Custom Title" ask.fr = "Titre personnalisé" type = "string" help = "Add a custom title for Send" - bind = ":__INSTALL_DIR__/server/config.js" + bind = "custom_title:__INSTALL_DIR__/server/config.js" [main.config.custom_description] ask.en = "Custom Description" ask.fr = "Description personnalisée" type = "string" help = "Add a custom description for Send" - bind = ":__INSTALL_DIR__/server/config.js" + bind = "custom_description:__INSTALL_DIR__/server/config.js" diff --git a/scripts/install b/scripts/install index e79aea3..2305f9b 100644 --- a/scripts/install +++ b/scripts/install @@ -13,7 +13,7 @@ ynh_app_setting_set --key=custom_title --value="$custom_title" custom_description="Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever." ynh_app_setting_set --key=custom_description --value="$custom_description" -max_file_size=2684354560 +max_file_size=100 ynh_app_setting_set --key=max_file_size --value="$max_file_size" max_download=100 diff --git a/scripts/upgrade b/scripts/upgrade index d688b75..585bf91 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,12 +19,12 @@ if [ -z ${custom_description:-} ]; then fi if [ -z ${max_file_size:-} ]; then - max_file_size="2684354560" + max_file_size=100 ynh_app_setting_set --key=max_file_size --value="$max_file_size" fi if [ -z ${max_download:-} ]; then - max_download="100" + max_download=100 ynh_app_setting_set --key=max_download --value="$max_download" fi