aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-01-30 11:37:01 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2020-04-19 10:30:56 +0200
commit6c603e8e7d1ac52eeefdda939fa96a0c27b7c3da (patch)
tree82c496f7f12dcc4a482ff3f201d8e16f98022ae9 /lib/private/Server.php
parent64196ddd19684b6a218428eeb6ee370d0514b68c (diff)
downloadnextcloud-server-6c603e8e7d1ac52eeefdda939fa96a0c27b7c3da.tar.gz
nextcloud-server-6c603e8e7d1ac52eeefdda939fa96a0c27b7c3da.zip
Move to subfolders for preview files
Else the number of files can grow very large very quickly in the preview folder. Esp on large systems. This generates the md5 of the fileid. And then creates folders of the first 7 charts. In that folder is then a folder with the fileid. And inside there are the previews. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index cf4f8cc097b..4fe89e3098e 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -281,7 +281,7 @@ class Server extends ServerContainer implements IServerContainer {
return new PreviewManager(
$c->getConfig(),
$c->getRootFolder(),
- $c->getAppDataDir('preview'),
+ new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig(), 'preview'),
$c->getEventDispatcher(),
$c->getGeneratorHelper(),
$c->getSession()->get('user_id')
@@ -291,7 +291,7 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
return new \OC\Preview\Watcher(
- $c->getAppDataDir('preview')
+ new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig(), 'preview')
);
});