Skip to content

Commit

Permalink
Added missing code for variables NEXTCLOUD_CHUNK_SIZE and NEXTCLOUD_M…
Browse files Browse the repository at this point in the history
…AX_FILE_UPLOADS

Signed-off-by: Jehu Marcos Herrera Puentes <58377032+JMarcosHP@users.noreply.github.com>
  • Loading branch information
JMarcosHP committed Oct 21, 2024
1 parent 38854bc commit 51fc521
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions php/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@
'nextcloud_mount' => $configurationManager->GetNextcloudMount(),
'nextcloud_upload_limit' => $configurationManager->GetNextcloudUploadLimit(),
'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(),
'nextcloud_max_file_uploads' => $configurationManager->GetNexcloudMaxFileUploads(),
'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(),
'nextcloud_chunk_size' => $configurationManager->GetNextcloudChunkSize(),
'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(),
'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(),
'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled(),
Expand Down
13 changes: 13 additions & 0 deletions php/src/Data/ConfigurationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,19 @@ public function GetNextcloudMaxTime() : string {
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}

public function GetNexcloudMaxFileUploads() : string {
$envVariableName = 'NEXTCLOUD_MAX_FILE_UPLOADS';
$configName = 'nextcloud_max_file_uploads';
$defaultValue = '200';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}

public function GetNexcloudChunkSize() : string {
$envVariableName = 'NEXTCLOUD_CHUNK_SIZE';
$configName = 'nextcloud_chunk_size';
$defaultValue = '10485760';
}

public function GetBorgRetentionPolicy() : string {
$envVariableName = 'BORG_RETENTION_POLICY';
$configName = 'borg_retention_policy';
Expand Down
4 changes: 4 additions & 0 deletions php/src/Docker/DockerActionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ public function CreateContainer(Container $container) : void {
$replacements[1] = $this->configurationManager->GetNextcloudMemoryLimit();
} elseif ($out[1] === 'NEXTCLOUD_MAX_TIME') {
$replacements[1] = $this->configurationManager->GetNextcloudMaxTime();
} elseif ($out[1] === 'NEXTCLOUD_MAX_FILE_UPLOADS') {
$replacements[1] = $this->configurationManager->GetNextcloudMaxFileUploads();
} elseif ($out[1] === 'NEXTCLOUD_CHUNK_SIZE') {
$replacements[1] = $this->configurationManager->GetNextcloudChunkSize();
} elseif ($out[1] === 'BORG_RETENTION_POLICY') {
$replacements[1] = $this->configurationManager->GetBorgRetentionPolicy();
} elseif ($out[1] === 'NEXTCLOUD_TRUSTED_CACERTS_DIR') {
Expand Down
4 changes: 4 additions & 0 deletions php/templates/includes/aio-config.twig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@

<p>Nextcloud has a timeout of {{ nextcloud_max_time }} seconds configured (important for big file uploads). See the <a href="https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud">NEXTCLOUD_MAX_TIME documentation</a> on how to change this.</p>

<p>Nextcloud has simultaneous file limit of {{ nextcloud_max_file_uploads }} files per single request. See the <a> href="https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-max-file-uploads-limit-for-nextcloud">NEXTCLOUD_MAX_FILE_UPLOADS documentation</a> on how to change this.</p>

<p>Nextcloud has a chunk size of {{ nextcloud_chunk_size }} configured for file uploads. See the <a> href="https://github.com/nextcloud/all-in-one#how-to-adjust-the-file-upload-chunk-size-for-nextcloud">NEXTCLOUD_CHUNK_SIZE documentation</a> on how to change this.</p>

<p>
{% if is_dri_device_enabled == true %}
The /dev/dri device which is needed for hardware transcoding is getting attached to the Nextcloud container.
Expand Down

0 comments on commit 51fc521

Please sign in to comment.