Apparently a couple server types (LAMP stacks too) support setting php values in .htaccess. It could be beneficial for Directus to set a default max upload size on the projects .htaccess, to make sure the user isn't limited by the default 2MB upload size
Add
php_value upload_max_filesize 50M
php_value post_max_size 100M
to the .htaccess file in /public
What would be the ideal default upload size?
Seems like a sensible default -- I think the only use-case for higher limit would be video.
50MB is probably enough for a 3-4 minute video clip.
Closed out in pull #805
Hi, I'm not sure if this change made was the best idea on a devops perspective as it overwrites the setting made in the server configurations php.ini ... so it is harder to automate, monitor, debug ...
Even if it is a good idea to somehow increase the defaults it just makes things more complicated when I wanna customize the setting using the php.ini because now I have some settings which do not have the desired effect anymore and I have to handle stuff on two sides, the php.ini and the .htaccess which just leads to a different kind of inconvenience and is less reliable as I don't know if these defaults will be changed in a future release or not and so on ...
For me this possibility belongs to the docs but not as a default setting in the .htaccess. It may be a good idea to keep it in the .htaccess as a commented-out suggestion.
I agree @mimamuh, I have a step in my CI that removes this for my client projects.
@directus/api-team?
I am sending a PR #1145
Most helpful comment
Hi, I'm not sure if this change made was the best idea on a devops perspective as it overwrites the setting made in the server configurations
php.ini... so it is harder to automate, monitor, debug ...Even if it is a good idea to somehow increase the defaults it just makes things more complicated when I wanna customize the setting using the
php.inibecause now I have some settings which do not have the desired effect anymore and I have to handle stuff on two sides, thephp.iniand the.htaccesswhich just leads to a different kind of inconvenience and is less reliable as I don't know if these defaults will be changed in a future release or not and so on ...For me this possibility belongs to the docs but not as a default setting in the
.htaccess. It may be a good idea to keep it in the.htaccessas a commented-out suggestion.