aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/Controller/DirectController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Controller/DirectController.php b/apps/dav/lib/Controller/DirectController.php
index 4db71df7627..ff7c96ddef1 100644
--- a/apps/dav/lib/Controller/DirectController.php
+++ b/apps/dav/lib/Controller/DirectController.php
@@ -81,7 +81,7 @@ class DirectController extends OCSController {
/**
* @NoAdminRequired
*/
- public function getUrl(int $fileId): DataResponse {
+ public function getUrl(int $fileId, int $expirationTime = 60 * 60 * 8): DataResponse {
$userFolder = $this->rootFolder->getUserFolder($this->userId);
$files = $userFolder->getById($fileId);
@@ -102,7 +102,7 @@ class DirectController extends OCSController {
$token = $this->random->generate(60, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
$direct->setToken($token);
- $direct->setExpiration($this->timeFactory->getTime() + 60 * 60 * 8);
+ $direct->setExpiration($this->timeFactory->getTime() + $expirationTime);
$this->mapper->insert($direct);