1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bonfire_ynh.git synced 2024-09-03 18:16:01 +02:00

fix media_upload_size extraction

This commit is contained in:
lapineige 2023-08-12 13:08:17 +02:00 committed by GitHub
parent 5812be1566
commit eb126eb7f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"
#=================================================