diff --git a/lib/Service/FileService.php b/lib/Service/FileService.php index 7f5a0dbfc3..6fa6190f7b 100644 --- a/lib/Service/FileService.php +++ b/lib/Service/FileService.php @@ -412,7 +412,7 @@ public function formatFile(Node $file): array 'extension' => $file->getExtension(), 'size' => $file->getSize(), 'hash' => $file->getEtag(), - 'published' => (new DateTime())->setTimestamp($file->getCreationTime())->format('c'), + 'published' => count($shares) > 0 ? $shares[0]->getShareTime()->format('c') : null, 'modified' => (new DateTime())->setTimestamp($file->getUploadTime())->format('c'), 'labels' => $this->getFileTags(fileId: $file->getId()) ];