âš I'm not sure how to reproduce this bug because I think it is mainly due to the environment.
Here are some details about the environment:
Feel free to ask if you need more details, I don't know what can be useful to understand the issue.

Max file size should be 62 MB.
Max file size is 2 MB.
I made it work by just changing one line of code:
--- a/src/endpoints/Home.php
+++ b/src/endpoints/Home.php
@@ -12,7 +12,7 @@ class Home extends Route
public function __invoke(Request $request, Response $response)
{
$service = new ServerService($this->container);
- $responseData = $service->findAllInfo();
+ $responseData = $service->findAllInfo(false);
return $this->responseWithData($request, $response, $responseData);
}
Where did you change the post_max_size, and upload_max_filesize value? Ideally this endpoint (/) should get you the php.ini value instead of the configured value. To get the configured value each project endpoint should use it.
Now I don't know if getting the php.ini value will be really useful.
Okay, that explains the boolean parameter so! I didn't understand very its usefulness, that's why I didn't say "it's the solution" but "I made it work" 😊
Now, what could I provide you so we can understand what is wrong here?
I don't really know how this hosting is handled (except that it works with Plesk), but I got these values from phpinfo():
I'd like to share the full phpinfo() output with you but I'm afraid it won't be "safe" as I am not the owner of this hosting.
That's okay do not share sensitive data. I know it will fix it, I don't know if we should ignore the php.ini value (which is the value you get when it's true) or make the app to use the /[project]/ endpoint which actually uses $responseData = $service->findAllInfo(false);.
In really I am do not see any useful solution to know the "global" value. Same as in phpinfo, it gives you two values the one in php.ini and the one while on runtime.
Actually, this should be the actual runtime value. In reality the upload size should be the actual value on runtime, because that's the one being used.
If this value was actually useful, we can re-add it.
Actually, the default behavior (with true) worked for me on two hostings (local with Windows and a shared hosting at OVH).
Maybe Directus should provide a way to choose between the value from php.ini and the one from runtime?
It doesn't sound intuitive to me but if both may return wrong values in different cases, maybe both options should be available.
Hey @sebj54, I fixed this by getting configuration values from runtime by default.
Most helpful comment
Hey @sebj54, I fixed this by getting configuration values from runtime by default.