From e643a5f68cc02ef820e789456b9cfc70de70626e Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Wed, 11 Jan 2017 22:14:51 +0100 Subject: [PATCH] Increase max file size (1000 MB) --- nextcloud_install_production.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index ff607aaf..d0f4ef58 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -362,6 +362,18 @@ sed -i "s|post_max_size = 8M|post_max_size = 1100M|g" /etc/php/7.0/apache2/php.i # upload_max sed -i "s|upload_max_filesize = 2M|upload_max_filesize = 1000M|g" /etc/php/7.0/apache2/php.ini +# Increase max filesize (expects that changes are made in /etc/php/7.0/apache2/php.ini) +# Here is a guide: https://www.techandme.se/increase-max-file-size/ +VALUE="# php_value upload_max_filesize 513M" +if grep -Fxq "$VALUE" $NCPATH/.htaccess +then + echo "Value correct" +else + sed -i 's/ php_value upload_max_filesize 513M/# php_value upload_max_filesize 513M/g' $NCPATH/.htaccess + sed -i 's/ php_value post_max_size 513M/# php_value post_max_size 513M/g' $NCPATH/.htaccess + sed -i 's/ php_value memory_limit 512M/# php_value memory_limit 512M/g' $NCPATH/.htaccess +fi + # Install Figlet apt install figlet -y