In addition to changing your code, you also need to change the setting on the server to accommodate uploading larger file sizes. The settings that need to be changed are in the php.ini file: sudo vi /etc/php/7.0/apache2/php.ini (the path here
Upgrading to Apache 2.4 will prevent WebDAV listing of directories containing index files
I recently upgraded Apache from 2.2 to 2.4 and among all the expected changes that had to be made to the existing sites-available config files, I encountered an unexpected issue with the WebDAV sites. I could connect to the sites