mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Show configured and effective maximum file size in server info page.
This commit is contained in:
parent
27de5ae387
commit
f9fd015ecb
3 changed files with 10 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.0.3
|
1.0.4-dev
|
|
@ -21,6 +21,7 @@
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
use App\Services\Attachments\AttachmentPathResolver;
|
use App\Services\Attachments\AttachmentPathResolver;
|
||||||
|
use App\Services\Attachments\AttachmentSubmitHandler;
|
||||||
use App\Services\Attachments\AttachmentURLGenerator;
|
use App\Services\Attachments\AttachmentURLGenerator;
|
||||||
use App\Services\Attachments\BuiltinAttachmentsFinder;
|
use App\Services\Attachments\BuiltinAttachmentsFinder;
|
||||||
use App\Services\Misc\GitVersionInfo;
|
use App\Services\Misc\GitVersionInfo;
|
||||||
|
@ -49,7 +50,8 @@ class ToolsController extends AbstractController
|
||||||
/**
|
/**
|
||||||
* @Route("/server_infos", name="tools_server_infos")
|
* @Route("/server_infos", name="tools_server_infos")
|
||||||
*/
|
*/
|
||||||
public function systemInfos(GitVersionInfo $versionInfo, DBInfoHelper $DBInfoHelper): Response
|
public function systemInfos(GitVersionInfo $versionInfo, DBInfoHelper $DBInfoHelper,
|
||||||
|
AttachmentSubmitHandler $attachmentSubmitHandler): Response
|
||||||
{
|
{
|
||||||
$this->denyAccessUnlessGranted('@system.server_infos');
|
$this->denyAccessUnlessGranted('@system.server_infos');
|
||||||
|
|
||||||
|
@ -73,6 +75,8 @@ class ToolsController extends AbstractController
|
||||||
'allow_attachments_downloads' => $this->getParameter('partdb.attachments.allow_downloads'),
|
'allow_attachments_downloads' => $this->getParameter('partdb.attachments.allow_downloads'),
|
||||||
'detailed_error_pages' => $this->getParameter('partdb.error_pages.show_help'),
|
'detailed_error_pages' => $this->getParameter('partdb.error_pages.show_help'),
|
||||||
'error_page_admin_email' => $this->getParameter('partdb.error_pages.admin_email'),
|
'error_page_admin_email' => $this->getParameter('partdb.error_pages.admin_email'),
|
||||||
|
'configured_max_file_size' => $this->getParameter('partdb.attachments.max_file_size'),
|
||||||
|
'effective_max_file_size' => $attachmentSubmitHandler->getMaximumAllowedUploadSize(),
|
||||||
|
|
||||||
//PHP section
|
//PHP section
|
||||||
'php_version' => PHP_VERSION,
|
'php_version' => PHP_VERSION,
|
||||||
|
|
|
@ -62,5 +62,9 @@
|
||||||
<td>Detailed error pages enabled</td>
|
<td>Detailed error pages enabled</td>
|
||||||
<td>{{ helper.boolean_badge(detailed_error_pages) }} (Admin Contact email: {{ error_page_admin_email }})</td>
|
<td>{{ helper.boolean_badge(detailed_error_pages) }} (Admin Contact email: {{ error_page_admin_email }})</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Maximum file size for attachments</td>
|
||||||
|
<td>{{ configured_max_file_size }} (Effective: {{ effective_max_file_size | format_bytes }})</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
Loading…
Add table
Add a link
Reference in a new issue