diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2017-11-10 15:35:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-10 15:35:58 +0100 |
commit | 1a2f9fe678fce329c37b69df47164a2eddead8f1 (patch) | |
tree | 0648f61ec8e3f2ff9c526a90e7858a28a9829764 /apps/files/lib/App.php | |
parent | d3e7dd19928e90c87a4732a9c28020336dab57c7 (diff) | |
parent | cd8d13b9e6e7bbf0e17f31c60021804ac4772939 (diff) | |
download | nextcloud-server-1a2f9fe678fce329c37b69df47164a2eddead8f1.tar.gz nextcloud-server-1a2f9fe678fce329c37b69df47164a2eddead8f1.zip |
Merge pull request #7056 from nextcloud/oc-28415-enable-chunking-in-authenticated-web-upload
[oc] Enable chunking for bigger files in authenticated web upload
Diffstat (limited to 'apps/files/lib/App.php')
-rw-r--r-- | apps/files/lib/App.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files/lib/App.php b/apps/files/lib/App.php index ca4b0b7f4f0..b756b123c43 100644 --- a/apps/files/lib/App.php +++ b/apps/files/lib/App.php @@ -54,4 +54,14 @@ class App { return self::$navigationManager; } + public static function extendJsConfig($settings) { + $appConfig = json_decode($settings['array']['oc_appconfig'], true); + + $maxChunkSize = (int)(\OC::$server->getConfig()->getAppValue('files', 'max_chunk_size', (10 * 1024 * 1024))); + $appConfig['files'] = [ + 'max_chunk_size' => $maxChunkSize + ]; + + $settings['array']['oc_appconfig'] = json_encode($appConfig); + } } |