diff --git a/conf/config.js b/conf/config.js index a0e9253..d21200c 100644 --- a/conf/config.js +++ b/conf/config.js @@ -75,7 +75,7 @@ const conf = convict({ max_downloads: { format: Number, default: 100, - env: 'MAX_DOWNLOADS' + env: '__MAX_DOWNLOADS__' }, max_files_per_archive: { format: Number, diff --git a/config_panel.toml b/config_panel.toml index 0ac6a11..9fa8ebe 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -16,27 +16,27 @@ services = ["__APP__"] 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" + bind = "max_file_size:/var/www/__APP__/server/config.js" - [main.config.max_download] - ask.en = "Max download" - ask.fr = "Téléchargement maximal" + [main.config.max_downloads] + ask.en = "Max downloads" + ask.fr = "Téléchargements maximal" type = "number" default = 100 help.en = "Define the maximum download limit" help.fr = "Définir la limite maximale du nombre de téléchargement" - bind = "max_download:__INSTALL_DIR__/server/config.js" + bind = "max_downloads:/var/www/__APP__/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 = "custom_title:__INSTALL_DIR__/server/config.js" + bind = "custom_title:/var/www/__APP__/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 = "custom_description:__INSTALL_DIR__/server/config.js" + bind = "custom_description:/var/www/__APP__/server/config.js" diff --git a/doc/ADMIN.md b/doc/ADMIN.md deleted file mode 100644 index c87b3d2..0000000 --- a/doc/ADMIN.md +++ /dev/null @@ -1,2 +0,0 @@ -The config file path is `__INSTALL_DIR__/server/config.js`. -You can configure things such as the max file size, max downloads, or max file expire time. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md deleted file mode 100644 index 0e7b52e..0000000 --- a/doc/ADMIN_fr.md +++ /dev/null @@ -1,2 +0,0 @@ -Le chemin du fichier de configuration est `__INSTALL_DIR__/server/config.js`. -Vous pouvez configurer des paramètres tels que les taille de fichier, nombre de téléchargements, ou temps d'expiration des fichiers maximums. diff --git a/scripts/install b/scripts/install index 8612574..219f0dc 100644 --- a/scripts/install +++ b/scripts/install @@ -16,8 +16,8 @@ ynh_app_setting_set --key=custom_description --value="$custom_description" max_file_size=100 ynh_app_setting_set --key=max_file_size --value="$max_file_size" -max_download=100 -ynh_app_setting_set --key=max_download --value="$max_download" +max_downloads=100 +ynh_app_setting_set --key=max_downloads --value="$max_downloads" #================================================= # INSTALL DEPENDENCIES diff --git a/scripts/upgrade b/scripts/upgrade index e293a39..46830df 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,9 +23,9 @@ if [ -z ${max_file_size:-} ]; then ynh_app_setting_set --key=max_file_size --value="$max_file_size" fi -if [ -z ${max_download:-} ]; then - max_download=100 - ynh_app_setting_set --key=max_download --value="$max_download" +if [ -z ${max_downloads:-} ]; then + max_downloads=100 + ynh_app_setting_set --key=max_downloads --value="$max_downloads" fi #=================================================