This commit is contained in:
Éric Gaspar 2024-11-07 09:58:09 +01:00
parent 362200ef97
commit 1dcb43a607
4 changed files with 11 additions and 11 deletions

View File

@ -156,7 +156,7 @@ const conf = convict({
max_file_size: { max_file_size: {
format: Number, format: Number,
default: 1024 * 1024 * 1024 * 2.5, default: 1024 * 1024 * 1024 * 2.5,
env: '__MAX_FILE_SIZE__' env: __MAX_FILE_SIZE__ * 1024 * 1024,
}, },
l10n_dev: { l10n_dev: {
format: Boolean, format: Boolean,

View File

@ -13,10 +13,10 @@ services = ["__APP__"]
ask.en = "Max File Size" ask.en = "Max File Size"
ask.fr = "Taille maximale du fichier" ask.fr = "Taille maximale du fichier"
type = "number" type = "number"
default = 2684354560 default = 100
help.en = "Define the maximum file size limit" help.en = "Choose the maximum file size allowed to send (in Mo)"
help.fr = "Définir la limite de taille maximale du fichier" help.fr = "Choisissez la taille maximale du fichier autorisé à envoyer (en Mo)"
bind = ":__INSTALL_DIR__/server/config.js" bind = "max_file_size:__INSTALL_DIR__/server/config.js"
[main.config.max_download] [main.config.max_download]
ask.en = "Max download" ask.en = "Max download"
@ -25,18 +25,18 @@ services = ["__APP__"]
default = 100 default = 100
help.en = "Define the maximum download limit" help.en = "Define the maximum download limit"
help.fr = "Définir la limite maximale du nombre de téléchargement" 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] [main.config.custom_title]
ask.en = "Custom Title" ask.en = "Custom Title"
ask.fr = "Titre personnalisé" ask.fr = "Titre personnalisé"
type = "string" type = "string"
help = "Add a custom title for Send" 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] [main.config.custom_description]
ask.en = "Custom Description" ask.en = "Custom Description"
ask.fr = "Description personnalisée" ask.fr = "Description personnalisée"
type = "string" type = "string"
help = "Add a custom description for Send" help = "Add a custom description for Send"
bind = ":__INSTALL_DIR__/server/config.js" bind = "custom_description:__INSTALL_DIR__/server/config.js"

View File

@ -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 dont stay online forever." custom_description="Encrypt and send files with a link that automatically expires to ensure your important documents dont stay online forever."
ynh_app_setting_set --key=custom_description --value="$custom_description" 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" ynh_app_setting_set --key=max_file_size --value="$max_file_size"
max_download=100 max_download=100

View File

@ -19,12 +19,12 @@ if [ -z ${custom_description:-} ]; then
fi fi
if [ -z ${max_file_size:-} ]; then 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" ynh_app_setting_set --key=max_file_size --value="$max_file_size"
fi fi
if [ -z ${max_download:-} ]; then if [ -z ${max_download:-} ]; then
max_download="100" max_download=100
ynh_app_setting_set --key=max_download --value="$max_download" ynh_app_setting_set --key=max_download --value="$max_download"
fi fi