From eb126eb7f9aead33e8a43d2af38aee1de14aa99f Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:08:17 +0200 Subject: [PATCH] fix media_upload_size extraction --- scripts/install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 44d871c..b67e314 100644 --- a/scripts/install +++ b/scripts/install @@ -46,7 +46,10 @@ chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" # max file upload size -MEDIA_UPLOAD_SIZE="${media_upload_size:0:2}000000" # convert the MB argument in bytes +MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" + +"${media_upload_size:0:2}000000" # convert the MB argument in bytes +STRING="5MB,10MB"; echo ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" #=================================================