I set file max size to 100MB, but the upload interface (not sure the name) below show 64MB, maybe it is setting by the php upload_max_filesize setting? So should we alert a error when the size value is greater than php setting? it's make sense.


Good catch!
@bjgajjar could you verify where in the API this value is used currently? I'm wondering if it even makes sense to have two different settings for the same functionality (one being PHP ini, the other being directus_settings)
@rijkvanzanten I'll update you soon on this :)
@rijkvanzanten - API is returning the value from php.ini in the project detail API but verifying the file size from the settings table; which is wrong.
IMO, we should remove the file_size configuration from settings table and validate the size from php.ini only.
Let me know your thoughts on this. So I can implement the needful changes.
I agree, lets not have two different places to configure the same thing
I agree with simplifying, but wasn't the Directus Setting supposed to be used to _set_ the php.ini override? Or are we saying that this can/will only be configured at the server/code level?
This size is also related the web server configuration, not only php.ini, and this will be configured correctly by system administrator.
so the only problem is that we should not show a limit value from php to user, and if the file max size is large than php.ini setting, we should show a error prompt to let users modify server restrictions.
I agree with simplifying, but wasn't the Directus Setting supposed to be used to set the php.ini override? Or are we saying that this can/will only be configured at the server/code level?
I don't know if we _can_ set that. @bjgajjar ?
is that we should not show a limit value from php to user,
Why not @everyx ?
is that we should not show a limit value from php to user,
Why not @everyx ?
@rijkvanzanten Sorry for my expression, what I meant is the two values of setting and upload interface show to user are inconsistent is confusing, we should keep them same, and don't allow user set a size greater than the server limit we can know, and give the user a relevant prompt.
Ohh gotchu! If we get rid of the option in settings, and only rely on the PHP value, we solve the same problem right?
Yes, remove the option and let it only be configured at the server/php level if we don't need a api based limit other than the server's :)
@rijkvanzanten - In conclusion, I am removing the value from the settings table and consider the value from the php.ini. Will that work?
In what places is the settings one used right now?
To validate the file size in create and update action. [For upload basically]
Ok, lets use php.ini value for that too. Right now, the app reads / uses the max-upload-size that's returned by the info endpoint, which is already based on the php.ini value
Most helpful comment
Good catch!
@bjgajjar could you verify where in the API this value is used currently? I'm wondering if it even makes sense to have two different settings for the same functionality (one being PHP ini, the other being directus_settings)